//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension DirectConnect {
    // MARK: Enums

    public enum AddressFamily: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case iPv4 = "ipv4"
        case iPv6 = "ipv6"
        public var description: String { return self.rawValue }
    }

    public enum BGPPeerState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "available"
        case deleted = "deleted"
        case deleting = "deleting"
        case pending = "pending"
        case verifying = "verifying"
        public var description: String { return self.rawValue }
    }

    public enum BGPStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case down = "down"
        case unknown = "unknown"
        case up = "up"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "available"
        case deleted = "deleted"
        case deleting = "deleting"
        case down = "down"
        case ordering = "ordering"
        case pending = "pending"
        case rejected = "rejected"
        case requested = "requested"
        case unknown = "unknown"
        public var description: String { return self.rawValue }
    }

    public enum DirectConnectGatewayAssociationProposalState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case accepted = "accepted"
        case deleted = "deleted"
        case requested = "requested"
        public var description: String { return self.rawValue }
    }

    public enum DirectConnectGatewayAssociationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case associated = "associated"
        case associating = "associating"
        case disassociated = "disassociated"
        case disassociating = "disassociating"
        case updating = "updating"
        public var description: String { return self.rawValue }
    }

    public enum DirectConnectGatewayAttachmentState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case attached = "attached"
        case attaching = "attaching"
        case detached = "detached"
        case detaching = "detaching"
        public var description: String { return self.rawValue }
    }

    public enum DirectConnectGatewayAttachmentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case privateVirtualInterface = "PrivateVirtualInterface"
        case transitVirtualInterface = "TransitVirtualInterface"
        public var description: String { return self.rawValue }
    }

    public enum DirectConnectGatewayState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "available"
        case deleted = "deleted"
        case deleting = "deleting"
        case pending = "pending"
        public var description: String { return self.rawValue }
    }

    public enum GatewayType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case transitGateway = "transitGateway"
        case virtualPrivateGateway = "virtualPrivateGateway"
        public var description: String { return self.rawValue }
    }

    public enum HasLogicalRedundancy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case no = "no"
        case unknown = "unknown"
        case yes = "yes"
        public var description: String { return self.rawValue }
    }

    public enum InterconnectState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "available"
        case deleted = "deleted"
        case deleting = "deleting"
        case down = "down"
        case pending = "pending"
        case requested = "requested"
        case unknown = "unknown"
        public var description: String { return self.rawValue }
    }

    public enum LagState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "available"
        case deleted = "deleted"
        case deleting = "deleting"
        case down = "down"
        case pending = "pending"
        case requested = "requested"
        case unknown = "unknown"
        public var description: String { return self.rawValue }
    }

    public enum LoaContentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case pdf = "application/pdf"
        public var description: String { return self.rawValue }
    }

    public enum NniPartnerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case nonPartner = "nonPartner"
        case v1 = "v1"
        case v2 = "v2"
        public var description: String { return self.rawValue }
    }

    public enum VirtualInterfaceState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "available"
        case confirming = "confirming"
        case deleted = "deleted"
        case deleting = "deleting"
        case down = "down"
        case pending = "pending"
        case rejected = "rejected"
        case unknown = "unknown"
        case verifying = "verifying"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AcceptDirectConnectGatewayAssociationProposalRequest: AWSEncodableShape {
        /// The ID of the Amazon Web Services account that owns the virtual private gateway or transit gateway.
        public let associatedGatewayOwnerAccount: String
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String
        /// Overrides the Amazon VPC prefixes advertised to the Direct Connect gateway. For information about how to set the prefixes, see Allowed Prefixes in the Direct Connect User Guide.
        public let overrideAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?
        /// The ID of the request proposal.
        public let proposalId: String

        @inlinable
        public init(associatedGatewayOwnerAccount: String, directConnectGatewayId: String, overrideAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil, proposalId: String) {
            self.associatedGatewayOwnerAccount = associatedGatewayOwnerAccount
            self.directConnectGatewayId = directConnectGatewayId
            self.overrideAllowedPrefixesToDirectConnectGateway = overrideAllowedPrefixesToDirectConnectGateway
            self.proposalId = proposalId
        }

        private enum CodingKeys: String, CodingKey {
            case associatedGatewayOwnerAccount = "associatedGatewayOwnerAccount"
            case directConnectGatewayId = "directConnectGatewayId"
            case overrideAllowedPrefixesToDirectConnectGateway = "overrideAllowedPrefixesToDirectConnectGateway"
            case proposalId = "proposalId"
        }
    }

    public struct AcceptDirectConnectGatewayAssociationProposalResult: AWSDecodableShape {
        /// Information about an association between a Direct Connect gateway and a virtual gateway or transit gateway.
        public let directConnectGatewayAssociation: DirectConnectGatewayAssociation?

        @inlinable
        public init(directConnectGatewayAssociation: DirectConnectGatewayAssociation? = nil) {
            self.directConnectGatewayAssociation = directConnectGatewayAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociation = "directConnectGatewayAssociation"
        }
    }

    public struct AllocateConnectionOnInterconnectRequest: AWSEncodableShape {
        /// The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that only those Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection.
        public let bandwidth: String
        /// The name of the provisioned connection.
        public let connectionName: String
        /// The ID of the interconnect on which the connection will be provisioned.
        public let interconnectId: String
        /// The ID of the Amazon Web Services account of the customer for whom the connection will be provisioned.
        public let ownerAccount: String
        /// The dedicated VLAN provisioned to the connection.
        public let vlan: Int

        @inlinable
        public init(bandwidth: String, connectionName: String, interconnectId: String, ownerAccount: String, vlan: Int = 0) {
            self.bandwidth = bandwidth
            self.connectionName = connectionName
            self.interconnectId = interconnectId
            self.ownerAccount = ownerAccount
            self.vlan = vlan
        }

        private enum CodingKeys: String, CodingKey {
            case bandwidth = "bandwidth"
            case connectionName = "connectionName"
            case interconnectId = "interconnectId"
            case ownerAccount = "ownerAccount"
            case vlan = "vlan"
        }
    }

    public struct AllocateHostedConnectionRequest: AWSEncodableShape {
        /// The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, 10Gbps, and 25Gbps. Note that only those Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps, 10Gbps, or 25Gbps hosted connection.
        public let bandwidth: String
        /// The ID of the interconnect or LAG.
        public let connectionId: String
        /// The name of the hosted connection.
        public let connectionName: String
        /// The ID of the Amazon Web Services account ID of the customer for the connection.
        public let ownerAccount: String
        /// The tags associated with the connection.
        public let tags: [Tag]?
        /// The dedicated VLAN provisioned to the hosted connection.
        public let vlan: Int

        @inlinable
        public init(bandwidth: String, connectionId: String, connectionName: String, ownerAccount: String, tags: [Tag]? = nil, vlan: Int = 0) {
            self.bandwidth = bandwidth
            self.connectionId = connectionId
            self.connectionName = connectionName
            self.ownerAccount = ownerAccount
            self.tags = tags
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bandwidth = "bandwidth"
            case connectionId = "connectionId"
            case connectionName = "connectionName"
            case ownerAccount = "ownerAccount"
            case tags = "tags"
            case vlan = "vlan"
        }
    }

    public struct AllocatePrivateVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the connection on which the private virtual interface is provisioned.
        public let connectionId: String
        /// Information about the private virtual interface.
        public let newPrivateVirtualInterfaceAllocation: NewPrivateVirtualInterfaceAllocation
        /// The ID of the Amazon Web Services account that owns the virtual private interface.
        public let ownerAccount: String

        @inlinable
        public init(connectionId: String, newPrivateVirtualInterfaceAllocation: NewPrivateVirtualInterfaceAllocation, ownerAccount: String) {
            self.connectionId = connectionId
            self.newPrivateVirtualInterfaceAllocation = newPrivateVirtualInterfaceAllocation
            self.ownerAccount = ownerAccount
        }

        public func validate(name: String) throws {
            try self.newPrivateVirtualInterfaceAllocation.validate(name: "\(name).newPrivateVirtualInterfaceAllocation")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case newPrivateVirtualInterfaceAllocation = "newPrivateVirtualInterfaceAllocation"
            case ownerAccount = "ownerAccount"
        }
    }

    public struct AllocatePublicVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the connection on which the public virtual interface is provisioned.
        public let connectionId: String
        /// Information about the public virtual interface.
        public let newPublicVirtualInterfaceAllocation: NewPublicVirtualInterfaceAllocation
        /// The ID of the Amazon Web Services account that owns the public virtual interface.
        public let ownerAccount: String

        @inlinable
        public init(connectionId: String, newPublicVirtualInterfaceAllocation: NewPublicVirtualInterfaceAllocation, ownerAccount: String) {
            self.connectionId = connectionId
            self.newPublicVirtualInterfaceAllocation = newPublicVirtualInterfaceAllocation
            self.ownerAccount = ownerAccount
        }

        public func validate(name: String) throws {
            try self.newPublicVirtualInterfaceAllocation.validate(name: "\(name).newPublicVirtualInterfaceAllocation")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case newPublicVirtualInterfaceAllocation = "newPublicVirtualInterfaceAllocation"
            case ownerAccount = "ownerAccount"
        }
    }

    public struct AllocateTransitVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the connection on which the transit virtual interface is provisioned.
        public let connectionId: String
        /// Information about the transit virtual interface.
        public let newTransitVirtualInterfaceAllocation: NewTransitVirtualInterfaceAllocation
        /// The ID of the Amazon Web Services account that owns the transit virtual interface.
        public let ownerAccount: String

        @inlinable
        public init(connectionId: String, newTransitVirtualInterfaceAllocation: NewTransitVirtualInterfaceAllocation, ownerAccount: String) {
            self.connectionId = connectionId
            self.newTransitVirtualInterfaceAllocation = newTransitVirtualInterfaceAllocation
            self.ownerAccount = ownerAccount
        }

        public func validate(name: String) throws {
            try self.newTransitVirtualInterfaceAllocation.validate(name: "\(name).newTransitVirtualInterfaceAllocation")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case newTransitVirtualInterfaceAllocation = "newTransitVirtualInterfaceAllocation"
            case ownerAccount = "ownerAccount"
        }
    }

    public struct AllocateTransitVirtualInterfaceResult: AWSDecodableShape {
        /// Information about the transit virtual interface.
        public let virtualInterface: VirtualInterface?

        @inlinable
        public init(virtualInterface: VirtualInterface? = nil) {
            self.virtualInterface = virtualInterface
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterface = "virtualInterface"
        }
    }

    public struct AssociateConnectionWithLagRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String
        /// The ID of the LAG with which to associate the connection.
        public let lagId: String

        @inlinable
        public init(connectionId: String, lagId: String) {
            self.connectionId = connectionId
            self.lagId = lagId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case lagId = "lagId"
        }
    }

    public struct AssociateHostedConnectionRequest: AWSEncodableShape {
        /// The ID of the hosted connection.
        public let connectionId: String
        /// The ID of the interconnect or the LAG.
        public let parentConnectionId: String

        @inlinable
        public init(connectionId: String, parentConnectionId: String) {
            self.connectionId = connectionId
            self.parentConnectionId = parentConnectionId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case parentConnectionId = "parentConnectionId"
        }
    }

    public struct AssociateMacSecKeyRequest: AWSEncodableShape {
        /// The MAC Security (MACsec) CAK to associate with the dedicated connection. You can create the CKN/CAK pair using an industry standard tool. The valid values are 64 hexadecimal characters (0-9, A-E). If you use this request parameter, you must use the ckn request parameter and not use the secretARN request parameter.
        public let cak: String?
        /// The MAC Security (MACsec) CKN to associate with the dedicated connection. You can create the CKN/CAK pair using an industry standard tool. The valid values are 64 hexadecimal characters (0-9, A-E). If you use this request parameter, you must use the cak request parameter and not use the secretARN request parameter.
        public let ckn: String?
        /// The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx). You can use DescribeConnections or DescribeLags to retrieve connection ID.
        public let connectionId: String
        /// The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key to associate with the dedicated connection. You can use DescribeConnections or DescribeLags to retrieve the MAC Security (MACsec) secret key. If you use this request parameter, you do not use the ckn and cak request parameters.
        public let secretARN: String?

        @inlinable
        public init(cak: String? = nil, ckn: String? = nil, connectionId: String, secretARN: String? = nil) {
            self.cak = cak
            self.ckn = ckn
            self.connectionId = connectionId
            self.secretARN = secretARN
        }

        private enum CodingKeys: String, CodingKey {
            case cak = "cak"
            case ckn = "ckn"
            case connectionId = "connectionId"
            case secretARN = "secretARN"
        }
    }

    public struct AssociateMacSecKeyResponse: AWSDecodableShape {
        /// The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx).
        public let connectionId: String?
        /// The MAC Security (MACsec) security keys associated with the dedicated connection.
        public let macSecKeys: [MacSecKey]?

        @inlinable
        public init(connectionId: String? = nil, macSecKeys: [MacSecKey]? = nil) {
            self.connectionId = connectionId
            self.macSecKeys = macSecKeys
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case macSecKeys = "macSecKeys"
        }
    }

    public struct AssociateVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the LAG or connection.
        public let connectionId: String
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String

        @inlinable
        public init(connectionId: String, virtualInterfaceId: String) {
            self.connectionId = connectionId
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct AssociatedCoreNetwork: AWSDecodableShape {
        /// the ID of the Direct Connect gateway attachment.
        public let attachmentId: String?
        /// The ID of the Cloud WAN core network that the Direct Connect gateway is associated to.
        public let id: String?
        /// The account owner of the Cloud WAN core network.
        public let ownerAccount: String?

        @inlinable
        public init(attachmentId: String? = nil, id: String? = nil, ownerAccount: String? = nil) {
            self.attachmentId = attachmentId
            self.id = id
            self.ownerAccount = ownerAccount
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentId = "attachmentId"
            case id = "id"
            case ownerAccount = "ownerAccount"
        }
    }

    public struct AssociatedGateway: AWSDecodableShape {
        /// The ID of the associated gateway.
        public let id: String?
        /// The ID of the Amazon Web Services account that owns the associated virtual private gateway or transit gateway.
        public let ownerAccount: String?
        /// The Region where the associated gateway is located.
        public let region: String?
        /// The type of associated gateway.
        public let type: GatewayType?

        @inlinable
        public init(id: String? = nil, ownerAccount: String? = nil, region: String? = nil, type: GatewayType? = nil) {
            self.id = id
            self.ownerAccount = ownerAccount
            self.region = region
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case ownerAccount = "ownerAccount"
            case region = "region"
            case type = "type"
        }
    }

    public struct BGPPeer: AWSDecodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
        public let asn: Int?
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The Direct Connect endpoint that terminates the BGP peer.
        public let awsDeviceV2: String?
        /// The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.
        public let awsLogicalDeviceId: String?
        /// The ID of the BGP peer.
        public let bgpPeerId: String?
        /// The state of the BGP peer. The following are the possible values:    verifying: The BGP peering addresses or ASN require validation before the BGP peer can be created. This state applies only to public virtual interfaces.    pending: The BGP peer is created, and remains in this state until it is ready to be established.    available: The BGP peer is ready to be established.    deleting:  The BGP peer is being deleted.    deleted:  The BGP peer is deleted and cannot be established.
        public let bgpPeerState: BGPPeerState?
        /// The status of the BGP peer. The following are the possible values:    up: The BGP peer is established. This state does not indicate the  state of the routing function. Ensure that you are receiving routes over the BGP session.    down: The BGP peer is down.    unknown: The BGP peer status is not available.
        public let bgpStatus: BGPStatus?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int? = nil, authKey: String? = nil, awsDeviceV2: String? = nil, awsLogicalDeviceId: String? = nil, bgpPeerId: String? = nil, bgpPeerState: BGPPeerState? = nil, bgpStatus: BGPStatus? = nil, customerAddress: String? = nil) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.awsDeviceV2 = awsDeviceV2
            self.awsLogicalDeviceId = awsLogicalDeviceId
            self.bgpPeerId = bgpPeerId
            self.bgpPeerState = bgpPeerState
            self.bgpStatus = bgpStatus
            self.customerAddress = customerAddress
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case awsDeviceV2 = "awsDeviceV2"
            case awsLogicalDeviceId = "awsLogicalDeviceId"
            case bgpPeerId = "bgpPeerId"
            case bgpPeerState = "bgpPeerState"
            case bgpStatus = "bgpStatus"
            case customerAddress = "customerAddress"
        }
    }

    public struct ConfirmConnectionRequest: AWSEncodableShape {
        /// The ID of the hosted connection.
        public let connectionId: String

        @inlinable
        public init(connectionId: String) {
            self.connectionId = connectionId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
        }
    }

    public struct ConfirmConnectionResponse: AWSDecodableShape {
        /// The state of the connection. The following are the possible values:    ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.    requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.    pending: The connection has been approved and is being initialized.    available: The network link is up and the connection is ready for use.    down: The network link is down.    deleting: The connection is being deleted.    deleted: The connection has been deleted.    rejected: A hosted connection in the ordering state enters the rejected state if it is deleted by the customer.    unknown: The state of the connection is not available.
        public let connectionState: ConnectionState?

        @inlinable
        public init(connectionState: ConnectionState? = nil) {
            self.connectionState = connectionState
        }

        private enum CodingKeys: String, CodingKey {
            case connectionState = "connectionState"
        }
    }

    public struct ConfirmCustomerAgreementRequest: AWSEncodableShape {
        ///  The name of the customer agreement.
        ///
        public let agreementName: String?

        @inlinable
        public init(agreementName: String? = nil) {
            self.agreementName = agreementName
        }

        public func validate(name: String) throws {
            try self.validate(self.agreementName, name: "agreementName", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case agreementName = "agreementName"
        }
    }

    public struct ConfirmCustomerAgreementResponse: AWSDecodableShape {
        ///  The status of the customer agreement when the connection was created. This will be either signed or unsigned.
        public let status: String?

        @inlinable
        public init(status: String? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
        }
    }

    public struct ConfirmPrivateVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The ID of the virtual private gateway.
        public let virtualGatewayId: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String

        @inlinable
        public init(directConnectGatewayId: String? = nil, virtualGatewayId: String? = nil, virtualInterfaceId: String) {
            self.directConnectGatewayId = directConnectGatewayId
            self.virtualGatewayId = virtualGatewayId
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayId = "directConnectGatewayId"
            case virtualGatewayId = "virtualGatewayId"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct ConfirmPrivateVirtualInterfaceResponse: AWSDecodableShape {
        /// The state of the virtual interface. The following are the possible values:    confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.    verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.    pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.    available: A virtual interface that is able to forward traffic.    down: A virtual interface that is BGP down.    testing: A virtual interface is in this state immediately after calling StartBgpFailoverTest and remains in this state during the duration of the test.    deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.    deleted: A virtual interface that cannot forward traffic.    rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.    unknown: The state of the virtual interface is not available.
        public let virtualInterfaceState: VirtualInterfaceState?

        @inlinable
        public init(virtualInterfaceState: VirtualInterfaceState? = nil) {
            self.virtualInterfaceState = virtualInterfaceState
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceState = "virtualInterfaceState"
        }
    }

    public struct ConfirmPublicVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String

        @inlinable
        public init(virtualInterfaceId: String) {
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct ConfirmPublicVirtualInterfaceResponse: AWSDecodableShape {
        /// The state of the virtual interface. The following are the possible values:    confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.    verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.    pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.    available: A virtual interface that is able to forward traffic.    down: A virtual interface that is BGP down.    testing: A virtual interface is in this state immediately after calling StartBgpFailoverTest and remains in this state during the duration of the test.    deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.    deleted: A virtual interface that cannot forward traffic.    rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.    unknown: The state of the virtual interface is not available.
        public let virtualInterfaceState: VirtualInterfaceState?

        @inlinable
        public init(virtualInterfaceState: VirtualInterfaceState? = nil) {
            self.virtualInterfaceState = virtualInterfaceState
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceState = "virtualInterfaceState"
        }
    }

    public struct ConfirmTransitVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String

        @inlinable
        public init(directConnectGatewayId: String, virtualInterfaceId: String) {
            self.directConnectGatewayId = directConnectGatewayId
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayId = "directConnectGatewayId"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct ConfirmTransitVirtualInterfaceResponse: AWSDecodableShape {
        /// The state of the virtual interface. The following are the possible values:    confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.    verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.    pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.    available: A virtual interface that is able to forward traffic.    down: A virtual interface that is BGP down.    testing: A virtual interface is in this state immediately after calling StartBgpFailoverTest and remains in this state during the duration of the test.    deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.    deleted: A virtual interface that cannot forward traffic.    rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.    unknown: The state of the virtual interface is not available.
        public let virtualInterfaceState: VirtualInterfaceState?

        @inlinable
        public init(virtualInterfaceState: VirtualInterfaceState? = nil) {
            self.virtualInterfaceState = virtualInterfaceState
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceState = "virtualInterfaceState"
        }
    }

    public struct Connection: AWSDecodableShape {
        /// The Direct Connect endpoint on which the physical connection terminates.
        public let awsDevice: String?
        /// The Direct Connect endpoint that terminates the physical connection.
        public let awsDeviceV2: String?
        /// The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.
        public let awsLogicalDeviceId: String?
        /// The bandwidth of the connection.
        public let bandwidth: String?
        /// The ID of the connection.
        public let connectionId: String?
        /// The name of the connection.
        public let connectionName: String?
        /// The state of the connection. The following are the possible values:    ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.    requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.    pending: The connection has been approved and is being initialized.    available: The network link is up and the connection is ready for use.    down: The network link is down.    deleting: The connection is being deleted.    deleted: The connection has been deleted.    rejected: A hosted connection in the ordering state enters the rejected state if it is deleted by the customer.    unknown: The state of the connection is not available.
        public let connectionState: ConnectionState?
        /// The MAC Security (MACsec) connection encryption mode. The valid values are no_encrypt, should_encrypt, and must_encrypt.
        public let encryptionMode: String?
        /// Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6).
        public let hasLogicalRedundancy: HasLogicalRedundancy?
        /// Indicates whether jumbo frames are supported.
        public let jumboFrameCapable: Bool?
        /// The ID of the LAG.
        public let lagId: String?
        /// The time of the most recent call to DescribeLoa for this connection.
        public let loaIssueTime: Date?
        /// The location of the connection.
        public let location: String?
        /// Indicates whether the connection supports MAC Security (MACsec).
        public let macSecCapable: Bool?
        /// The MAC Security (MACsec) security keys associated with the connection.
        public let macSecKeys: [MacSecKey]?
        /// The ID of the Amazon Web Services account that owns the connection.
        public let ownerAccount: String?
        /// The name of the Direct Connect service provider associated with the connection.
        public let partnerName: String?
        /// The MAC Security (MACsec) port link status of the connection. The valid values are Encryption Up, which means that there is an active Connection Key Name, or Encryption Down.
        public let portEncryptionStatus: String?
        /// The name of the service provider associated with the connection.
        public let providerName: String?
        /// The Amazon Web Services Region where the connection is located.
        public let region: String?
        /// The tags associated with the connection.
        public let tags: [Tag]?
        /// The ID of the VLAN.
        public let vlan: Int?

        @inlinable
        public init(awsDevice: String? = nil, awsDeviceV2: String? = nil, awsLogicalDeviceId: String? = nil, bandwidth: String? = nil, connectionId: String? = nil, connectionName: String? = nil, connectionState: ConnectionState? = nil, encryptionMode: String? = nil, hasLogicalRedundancy: HasLogicalRedundancy? = nil, jumboFrameCapable: Bool? = nil, lagId: String? = nil, loaIssueTime: Date? = nil, location: String? = nil, macSecCapable: Bool? = nil, macSecKeys: [MacSecKey]? = nil, ownerAccount: String? = nil, partnerName: String? = nil, portEncryptionStatus: String? = nil, providerName: String? = nil, region: String? = nil, tags: [Tag]? = nil, vlan: Int? = nil) {
            self.awsDevice = awsDevice
            self.awsDeviceV2 = awsDeviceV2
            self.awsLogicalDeviceId = awsLogicalDeviceId
            self.bandwidth = bandwidth
            self.connectionId = connectionId
            self.connectionName = connectionName
            self.connectionState = connectionState
            self.encryptionMode = encryptionMode
            self.hasLogicalRedundancy = hasLogicalRedundancy
            self.jumboFrameCapable = jumboFrameCapable
            self.lagId = lagId
            self.loaIssueTime = loaIssueTime
            self.location = location
            self.macSecCapable = macSecCapable
            self.macSecKeys = macSecKeys
            self.ownerAccount = ownerAccount
            self.partnerName = partnerName
            self.portEncryptionStatus = portEncryptionStatus
            self.providerName = providerName
            self.region = region
            self.tags = tags
            self.vlan = vlan
        }

        private enum CodingKeys: String, CodingKey {
            case awsDevice = "awsDevice"
            case awsDeviceV2 = "awsDeviceV2"
            case awsLogicalDeviceId = "awsLogicalDeviceId"
            case bandwidth = "bandwidth"
            case connectionId = "connectionId"
            case connectionName = "connectionName"
            case connectionState = "connectionState"
            case encryptionMode = "encryptionMode"
            case hasLogicalRedundancy = "hasLogicalRedundancy"
            case jumboFrameCapable = "jumboFrameCapable"
            case lagId = "lagId"
            case loaIssueTime = "loaIssueTime"
            case location = "location"
            case macSecCapable = "macSecCapable"
            case macSecKeys = "macSecKeys"
            case ownerAccount = "ownerAccount"
            case partnerName = "partnerName"
            case portEncryptionStatus = "portEncryptionStatus"
            case providerName = "providerName"
            case region = "region"
            case tags = "tags"
            case vlan = "vlan"
        }
    }

    public struct Connections: AWSDecodableShape {
        /// The connections.
        public let connections: [Connection]?

        @inlinable
        public init(connections: [Connection]? = nil) {
            self.connections = connections
        }

        private enum CodingKeys: String, CodingKey {
            case connections = "connections"
        }
    }

    public struct CreateBGPPeerRequest: AWSEncodableShape {
        /// Information about the BGP peer.
        public let newBGPPeer: NewBGPPeer?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String?

        @inlinable
        public init(newBGPPeer: NewBGPPeer? = nil, virtualInterfaceId: String? = nil) {
            self.newBGPPeer = newBGPPeer
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case newBGPPeer = "newBGPPeer"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct CreateBGPPeerResponse: AWSDecodableShape {
        /// The virtual interface.
        public let virtualInterface: VirtualInterface?

        @inlinable
        public init(virtualInterface: VirtualInterface? = nil) {
            self.virtualInterface = virtualInterface
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterface = "virtualInterface"
        }
    }

    public struct CreateConnectionRequest: AWSEncodableShape {
        /// The bandwidth of the connection.
        public let bandwidth: String
        /// The name of the connection.
        public let connectionName: String
        /// The ID of the LAG.
        public let lagId: String?
        /// The location of the connection.
        public let location: String
        /// The name of the service provider associated with the requested connection.
        public let providerName: String?
        /// Indicates whether you want the connection to support MAC Security (MACsec). MAC Security (MACsec) is only available on dedicated connections. For information about MAC Security (MACsec) prerequisties, see  MACsec prerequisties in the Direct Connect User Guide.
        public let requestMACSec: Bool?
        /// The tags to associate with the lag.
        public let tags: [Tag]?

        @inlinable
        public init(bandwidth: String, connectionName: String, lagId: String? = nil, location: String, providerName: String? = nil, requestMACSec: Bool? = nil, tags: [Tag]? = nil) {
            self.bandwidth = bandwidth
            self.connectionName = connectionName
            self.lagId = lagId
            self.location = location
            self.providerName = providerName
            self.requestMACSec = requestMACSec
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bandwidth = "bandwidth"
            case connectionName = "connectionName"
            case lagId = "lagId"
            case location = "location"
            case providerName = "providerName"
            case requestMACSec = "requestMACSec"
            case tags = "tags"
        }
    }

    public struct CreateDirectConnectGatewayAssociationProposalRequest: AWSEncodableShape {
        /// The Amazon VPC prefixes to advertise to the Direct Connect gateway.
        public let addAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String
        /// The ID of the Amazon Web Services account that owns the Direct Connect gateway.
        public let directConnectGatewayOwnerAccount: String
        /// The ID of the virtual private gateway or transit gateway.
        public let gatewayId: String
        /// The Amazon VPC prefixes to no longer advertise to the Direct Connect gateway.
        public let removeAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?

        @inlinable
        public init(addAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil, directConnectGatewayId: String, directConnectGatewayOwnerAccount: String, gatewayId: String, removeAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil) {
            self.addAllowedPrefixesToDirectConnectGateway = addAllowedPrefixesToDirectConnectGateway
            self.directConnectGatewayId = directConnectGatewayId
            self.directConnectGatewayOwnerAccount = directConnectGatewayOwnerAccount
            self.gatewayId = gatewayId
            self.removeAllowedPrefixesToDirectConnectGateway = removeAllowedPrefixesToDirectConnectGateway
        }

        private enum CodingKeys: String, CodingKey {
            case addAllowedPrefixesToDirectConnectGateway = "addAllowedPrefixesToDirectConnectGateway"
            case directConnectGatewayId = "directConnectGatewayId"
            case directConnectGatewayOwnerAccount = "directConnectGatewayOwnerAccount"
            case gatewayId = "gatewayId"
            case removeAllowedPrefixesToDirectConnectGateway = "removeAllowedPrefixesToDirectConnectGateway"
        }
    }

    public struct CreateDirectConnectGatewayAssociationProposalResult: AWSDecodableShape {
        /// Information about the Direct Connect gateway proposal.
        public let directConnectGatewayAssociationProposal: DirectConnectGatewayAssociationProposal?

        @inlinable
        public init(directConnectGatewayAssociationProposal: DirectConnectGatewayAssociationProposal? = nil) {
            self.directConnectGatewayAssociationProposal = directConnectGatewayAssociationProposal
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociationProposal = "directConnectGatewayAssociationProposal"
        }
    }

    public struct CreateDirectConnectGatewayAssociationRequest: AWSEncodableShape {
        /// The Amazon VPC prefixes to advertise to the Direct Connect gateway This parameter is required when you create an association to a transit gateway. For information about how to set the prefixes, see Allowed Prefixes in the Direct Connect User Guide.
        public let addAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String
        /// The ID of the virtual private gateway or transit gateway.
        public let gatewayId: String?
        /// The ID of the virtual private gateway.
        public let virtualGatewayId: String?

        @inlinable
        public init(addAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil, directConnectGatewayId: String, gatewayId: String? = nil, virtualGatewayId: String? = nil) {
            self.addAllowedPrefixesToDirectConnectGateway = addAllowedPrefixesToDirectConnectGateway
            self.directConnectGatewayId = directConnectGatewayId
            self.gatewayId = gatewayId
            self.virtualGatewayId = virtualGatewayId
        }

        private enum CodingKeys: String, CodingKey {
            case addAllowedPrefixesToDirectConnectGateway = "addAllowedPrefixesToDirectConnectGateway"
            case directConnectGatewayId = "directConnectGatewayId"
            case gatewayId = "gatewayId"
            case virtualGatewayId = "virtualGatewayId"
        }
    }

    public struct CreateDirectConnectGatewayAssociationResult: AWSDecodableShape {
        /// The association to be created.
        public let directConnectGatewayAssociation: DirectConnectGatewayAssociation?

        @inlinable
        public init(directConnectGatewayAssociation: DirectConnectGatewayAssociation? = nil) {
            self.directConnectGatewayAssociation = directConnectGatewayAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociation = "directConnectGatewayAssociation"
        }
    }

    public struct CreateDirectConnectGatewayRequest: AWSEncodableShape {
        /// The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default is 64512.
        public let amazonSideAsn: Int64?
        /// The name of the Direct Connect gateway.
        public let directConnectGatewayName: String
        /// The key-value pair tags associated with the request.
        public let tags: [Tag]?

        @inlinable
        public init(amazonSideAsn: Int64? = nil, directConnectGatewayName: String, tags: [Tag]? = nil) {
            self.amazonSideAsn = amazonSideAsn
            self.directConnectGatewayName = directConnectGatewayName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case amazonSideAsn = "amazonSideAsn"
            case directConnectGatewayName = "directConnectGatewayName"
            case tags = "tags"
        }
    }

    public struct CreateDirectConnectGatewayResult: AWSDecodableShape {
        /// The Direct Connect gateway.
        public let directConnectGateway: DirectConnectGateway?

        @inlinable
        public init(directConnectGateway: DirectConnectGateway? = nil) {
            self.directConnectGateway = directConnectGateway
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGateway = "directConnectGateway"
        }
    }

    public struct CreateInterconnectRequest: AWSEncodableShape {
        /// The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
        public let bandwidth: String
        /// The name of the interconnect.
        public let interconnectName: String
        /// The ID of the LAG.
        public let lagId: String?
        /// The location of the interconnect.
        public let location: String
        /// The name of the service provider associated with the interconnect.
        public let providerName: String?
        /// The tags to associate with the interconnect.
        public let tags: [Tag]?

        @inlinable
        public init(bandwidth: String, interconnectName: String, lagId: String? = nil, location: String, providerName: String? = nil, tags: [Tag]? = nil) {
            self.bandwidth = bandwidth
            self.interconnectName = interconnectName
            self.lagId = lagId
            self.location = location
            self.providerName = providerName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bandwidth = "bandwidth"
            case interconnectName = "interconnectName"
            case lagId = "lagId"
            case location = "location"
            case providerName = "providerName"
            case tags = "tags"
        }
    }

    public struct CreateLagRequest: AWSEncodableShape {
        /// The tags to associate with the automtically created LAGs.
        public let childConnectionTags: [Tag]?
        /// The ID of an existing dedicated connection to migrate to the LAG.
        public let connectionId: String?
        /// The bandwidth of the individual physical dedicated connections bundled by the LAG. The possible values are  1Gbps,10Gbps, 100Gbps, and 400Gbps.
        public let connectionsBandwidth: String
        /// The name of the LAG.
        public let lagName: String
        /// The location for the LAG.
        public let location: String
        /// The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1Gbps or 10Gbps, or two when the port speed is 100Gbps or 400Gbps.
        public let numberOfConnections: Int
        /// The name of the service provider associated with the LAG.
        public let providerName: String?
        /// Indicates whether the connection will support MAC Security (MACsec).  All connections in the LAG must be capable of  supporting MAC Security (MACsec). For information about MAC Security (MACsec) prerequisties, see  MACsec prerequisties in the Direct Connect User Guide.
        public let requestMACSec: Bool?
        /// The tags to associate with the LAG.
        public let tags: [Tag]?

        @inlinable
        public init(childConnectionTags: [Tag]? = nil, connectionId: String? = nil, connectionsBandwidth: String, lagName: String, location: String, numberOfConnections: Int = 0, providerName: String? = nil, requestMACSec: Bool? = nil, tags: [Tag]? = nil) {
            self.childConnectionTags = childConnectionTags
            self.connectionId = connectionId
            self.connectionsBandwidth = connectionsBandwidth
            self.lagName = lagName
            self.location = location
            self.numberOfConnections = numberOfConnections
            self.providerName = providerName
            self.requestMACSec = requestMACSec
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.childConnectionTags?.forEach {
                try $0.validate(name: "\(name).childConnectionTags[]")
            }
            try self.validate(self.childConnectionTags, name: "childConnectionTags", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case childConnectionTags = "childConnectionTags"
            case connectionId = "connectionId"
            case connectionsBandwidth = "connectionsBandwidth"
            case lagName = "lagName"
            case location = "location"
            case numberOfConnections = "numberOfConnections"
            case providerName = "providerName"
            case requestMACSec = "requestMACSec"
            case tags = "tags"
        }
    }

    public struct CreatePrivateVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String
        /// Information about the private virtual interface.
        public let newPrivateVirtualInterface: NewPrivateVirtualInterface

        @inlinable
        public init(connectionId: String, newPrivateVirtualInterface: NewPrivateVirtualInterface) {
            self.connectionId = connectionId
            self.newPrivateVirtualInterface = newPrivateVirtualInterface
        }

        public func validate(name: String) throws {
            try self.newPrivateVirtualInterface.validate(name: "\(name).newPrivateVirtualInterface")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case newPrivateVirtualInterface = "newPrivateVirtualInterface"
        }
    }

    public struct CreatePublicVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String
        /// Information about the public virtual interface.
        public let newPublicVirtualInterface: NewPublicVirtualInterface

        @inlinable
        public init(connectionId: String, newPublicVirtualInterface: NewPublicVirtualInterface) {
            self.connectionId = connectionId
            self.newPublicVirtualInterface = newPublicVirtualInterface
        }

        public func validate(name: String) throws {
            try self.newPublicVirtualInterface.validate(name: "\(name).newPublicVirtualInterface")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case newPublicVirtualInterface = "newPublicVirtualInterface"
        }
    }

    public struct CreateTransitVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String
        /// Information about the transit virtual interface.
        public let newTransitVirtualInterface: NewTransitVirtualInterface

        @inlinable
        public init(connectionId: String, newTransitVirtualInterface: NewTransitVirtualInterface) {
            self.connectionId = connectionId
            self.newTransitVirtualInterface = newTransitVirtualInterface
        }

        public func validate(name: String) throws {
            try self.newTransitVirtualInterface.validate(name: "\(name).newTransitVirtualInterface")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case newTransitVirtualInterface = "newTransitVirtualInterface"
        }
    }

    public struct CreateTransitVirtualInterfaceResult: AWSDecodableShape {
        /// Information about a virtual interface.
        public let virtualInterface: VirtualInterface?

        @inlinable
        public init(virtualInterface: VirtualInterface? = nil) {
            self.virtualInterface = virtualInterface
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterface = "virtualInterface"
        }
    }

    public struct CustomerAgreement: AWSDecodableShape {
        /// The name of the agreement.
        public let agreementName: String?
        /// The status of the customer agreement. This will be either signed or unsigned
        public let status: String?

        @inlinable
        public init(agreementName: String? = nil, status: String? = nil) {
            self.agreementName = agreementName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case agreementName = "agreementName"
            case status = "status"
        }
    }

    public struct DeleteBGPPeerRequest: AWSEncodableShape {
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
        public let asn: Int?
        /// The ID of the BGP peer.
        public let bgpPeerId: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String?

        @inlinable
        public init(asn: Int? = nil, bgpPeerId: String? = nil, customerAddress: String? = nil, virtualInterfaceId: String? = nil) {
            self.asn = asn
            self.bgpPeerId = bgpPeerId
            self.customerAddress = customerAddress
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case asn = "asn"
            case bgpPeerId = "bgpPeerId"
            case customerAddress = "customerAddress"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct DeleteBGPPeerResponse: AWSDecodableShape {
        /// The virtual interface.
        public let virtualInterface: VirtualInterface?

        @inlinable
        public init(virtualInterface: VirtualInterface? = nil) {
            self.virtualInterface = virtualInterface
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterface = "virtualInterface"
        }
    }

    public struct DeleteConnectionRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String

        @inlinable
        public init(connectionId: String) {
            self.connectionId = connectionId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
        }
    }

    public struct DeleteDirectConnectGatewayAssociationProposalRequest: AWSEncodableShape {
        /// The ID of the proposal.
        public let proposalId: String

        @inlinable
        public init(proposalId: String) {
            self.proposalId = proposalId
        }

        private enum CodingKeys: String, CodingKey {
            case proposalId = "proposalId"
        }
    }

    public struct DeleteDirectConnectGatewayAssociationProposalResult: AWSDecodableShape {
        /// The ID of the associated gateway.
        public let directConnectGatewayAssociationProposal: DirectConnectGatewayAssociationProposal?

        @inlinable
        public init(directConnectGatewayAssociationProposal: DirectConnectGatewayAssociationProposal? = nil) {
            self.directConnectGatewayAssociationProposal = directConnectGatewayAssociationProposal
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociationProposal = "directConnectGatewayAssociationProposal"
        }
    }

    public struct DeleteDirectConnectGatewayAssociationRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway association.
        public let associationId: String?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The ID of the virtual private gateway.
        public let virtualGatewayId: String?

        @inlinable
        public init(associationId: String? = nil, directConnectGatewayId: String? = nil, virtualGatewayId: String? = nil) {
            self.associationId = associationId
            self.directConnectGatewayId = directConnectGatewayId
            self.virtualGatewayId = virtualGatewayId
        }

        private enum CodingKeys: String, CodingKey {
            case associationId = "associationId"
            case directConnectGatewayId = "directConnectGatewayId"
            case virtualGatewayId = "virtualGatewayId"
        }
    }

    public struct DeleteDirectConnectGatewayAssociationResult: AWSDecodableShape {
        /// Information about the deleted association.
        public let directConnectGatewayAssociation: DirectConnectGatewayAssociation?

        @inlinable
        public init(directConnectGatewayAssociation: DirectConnectGatewayAssociation? = nil) {
            self.directConnectGatewayAssociation = directConnectGatewayAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociation = "directConnectGatewayAssociation"
        }
    }

    public struct DeleteDirectConnectGatewayRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String

        @inlinable
        public init(directConnectGatewayId: String) {
            self.directConnectGatewayId = directConnectGatewayId
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayId = "directConnectGatewayId"
        }
    }

    public struct DeleteDirectConnectGatewayResult: AWSDecodableShape {
        /// The Direct Connect gateway.
        public let directConnectGateway: DirectConnectGateway?

        @inlinable
        public init(directConnectGateway: DirectConnectGateway? = nil) {
            self.directConnectGateway = directConnectGateway
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGateway = "directConnectGateway"
        }
    }

    public struct DeleteInterconnectRequest: AWSEncodableShape {
        /// The ID of the interconnect.
        public let interconnectId: String

        @inlinable
        public init(interconnectId: String) {
            self.interconnectId = interconnectId
        }

        private enum CodingKeys: String, CodingKey {
            case interconnectId = "interconnectId"
        }
    }

    public struct DeleteInterconnectResponse: AWSDecodableShape {
        /// The state of the interconnect. The following are the possible values:    requested: The initial state of an interconnect. The interconnect stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.    pending: The interconnect is approved, and is being initialized.    available: The network link is up, and the interconnect is ready for use.    down: The network link is down.    deleting: The interconnect is being deleted.    deleted: The interconnect is deleted.    unknown: The state of the interconnect is not available.
        public let interconnectState: InterconnectState?

        @inlinable
        public init(interconnectState: InterconnectState? = nil) {
            self.interconnectState = interconnectState
        }

        private enum CodingKeys: String, CodingKey {
            case interconnectState = "interconnectState"
        }
    }

    public struct DeleteLagRequest: AWSEncodableShape {
        /// The ID of the LAG.
        public let lagId: String

        @inlinable
        public init(lagId: String) {
            self.lagId = lagId
        }

        private enum CodingKeys: String, CodingKey {
            case lagId = "lagId"
        }
    }

    public struct DeleteVirtualInterfaceRequest: AWSEncodableShape {
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String

        @inlinable
        public init(virtualInterfaceId: String) {
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct DeleteVirtualInterfaceResponse: AWSDecodableShape {
        /// The state of the virtual interface. The following are the possible values:    confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.    verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.    pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.    available: A virtual interface that is able to forward traffic.    down: A virtual interface that is BGP down.    testing: A virtual interface is in this state immediately after calling StartBgpFailoverTest and remains in this state during the duration of the test.    deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.    deleted: A virtual interface that cannot forward traffic.    rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.    unknown: The state of the virtual interface is not available.
        public let virtualInterfaceState: VirtualInterfaceState?

        @inlinable
        public init(virtualInterfaceState: VirtualInterfaceState? = nil) {
            self.virtualInterfaceState = virtualInterfaceState
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceState = "virtualInterfaceState"
        }
    }

    public struct DescribeConnectionLoaRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String
        /// The standard media type for the LOA-CFA document. The only supported value is application/pdf.
        public let loaContentType: LoaContentType?
        /// The name of the APN partner or service provider who establishes connectivity on your behalf. If you specify this parameter,  the LOA-CFA lists the provider name alongside your company name as the requester of the cross connect.
        public let providerName: String?

        @inlinable
        public init(connectionId: String, loaContentType: LoaContentType? = nil, providerName: String? = nil) {
            self.connectionId = connectionId
            self.loaContentType = loaContentType
            self.providerName = providerName
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case loaContentType = "loaContentType"
            case providerName = "providerName"
        }
    }

    public struct DescribeConnectionLoaResponse: AWSDecodableShape {
        /// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA).
        public let loa: Loa?

        @inlinable
        public init(loa: Loa? = nil) {
            self.loa = loa
        }

        private enum CodingKeys: String, CodingKey {
            case loa = "loa"
        }
    }

    public struct DescribeConnectionsOnInterconnectRequest: AWSEncodableShape {
        /// The ID of the interconnect.
        public let interconnectId: String

        @inlinable
        public init(interconnectId: String) {
            self.interconnectId = interconnectId
        }

        private enum CodingKeys: String, CodingKey {
            case interconnectId = "interconnectId"
        }
    }

    public struct DescribeConnectionsRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String?

        @inlinable
        public init(connectionId: String? = nil) {
            self.connectionId = connectionId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
        }
    }

    public struct DescribeCustomerMetadataResponse: AWSDecodableShape {
        /// The list of customer agreements.
        public let agreements: [CustomerAgreement]?
        /// The type of network-to-network interface (NNI) partner. The partner type will be one of the following:   V1: This partner can only allocate 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps subgigabit connections.   V2: This partner can only allocate 1GB, 2GB, 5GB, or 10GB hosted connections.   nonPartner: The customer is not a partner.
        public let nniPartnerType: NniPartnerType?

        @inlinable
        public init(agreements: [CustomerAgreement]? = nil, nniPartnerType: NniPartnerType? = nil) {
            self.agreements = agreements
            self.nniPartnerType = nniPartnerType
        }

        private enum CodingKeys: String, CodingKey {
            case agreements = "agreements"
            case nniPartnerType = "nniPartnerType"
        }
    }

    public struct DescribeDirectConnectGatewayAssociationProposalsRequest: AWSEncodableShape {
        /// The ID of the associated gateway.
        public let associatedGatewayId: String?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The maximum number of results to return with a single call.
        /// 	To retrieve the remaining results, make another call with the returned nextToken value. If MaxResults is given a value larger than 100, only 100 results are returned.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The ID of the proposal.
        public let proposalId: String?

        @inlinable
        public init(associatedGatewayId: String? = nil, directConnectGatewayId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, proposalId: String? = nil) {
            self.associatedGatewayId = associatedGatewayId
            self.directConnectGatewayId = directConnectGatewayId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.proposalId = proposalId
        }

        private enum CodingKeys: String, CodingKey {
            case associatedGatewayId = "associatedGatewayId"
            case directConnectGatewayId = "directConnectGatewayId"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case proposalId = "proposalId"
        }
    }

    public struct DescribeDirectConnectGatewayAssociationProposalsResult: AWSDecodableShape {
        /// Describes the Direct Connect gateway association proposals.
        public let directConnectGatewayAssociationProposals: [DirectConnectGatewayAssociationProposal]?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?

        @inlinable
        public init(directConnectGatewayAssociationProposals: [DirectConnectGatewayAssociationProposal]? = nil, nextToken: String? = nil) {
            self.directConnectGatewayAssociationProposals = directConnectGatewayAssociationProposals
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociationProposals = "directConnectGatewayAssociationProposals"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDirectConnectGatewayAssociationsRequest: AWSEncodableShape {
        /// The ID of the associated gateway.
        public let associatedGatewayId: String?
        /// The ID of the Direct Connect gateway association.
        public let associationId: String?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The maximum number of results to return with a single call.
        /// 	To retrieve the remaining results, make another call with the returned nextToken value. If MaxResults is given a value larger than 100, only 100 results are returned.
        public let maxResults: Int?
        /// The token provided in the previous call to retrieve the next page.
        public let nextToken: String?
        /// The ID of the virtual private gateway or transit gateway.
        public let virtualGatewayId: String?

        @inlinable
        public init(associatedGatewayId: String? = nil, associationId: String? = nil, directConnectGatewayId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, virtualGatewayId: String? = nil) {
            self.associatedGatewayId = associatedGatewayId
            self.associationId = associationId
            self.directConnectGatewayId = directConnectGatewayId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.virtualGatewayId = virtualGatewayId
        }

        private enum CodingKeys: String, CodingKey {
            case associatedGatewayId = "associatedGatewayId"
            case associationId = "associationId"
            case directConnectGatewayId = "directConnectGatewayId"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case virtualGatewayId = "virtualGatewayId"
        }
    }

    public struct DescribeDirectConnectGatewayAssociationsResult: AWSDecodableShape {
        /// Information about the associations.
        public let directConnectGatewayAssociations: [DirectConnectGatewayAssociation]?
        /// The token to retrieve the next page.
        public let nextToken: String?

        @inlinable
        public init(directConnectGatewayAssociations: [DirectConnectGatewayAssociation]? = nil, nextToken: String? = nil) {
            self.directConnectGatewayAssociations = directConnectGatewayAssociations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociations = "directConnectGatewayAssociations"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDirectConnectGatewayAttachmentsRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The maximum number of results to return with a single call.
        /// 	To retrieve the remaining results, make another call with the returned nextToken value. If MaxResults is given a value larger than 100, only 100 results are returned.
        public let maxResults: Int?
        /// The token provided in the previous call to retrieve the next page.
        public let nextToken: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String?

        @inlinable
        public init(directConnectGatewayId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, virtualInterfaceId: String? = nil) {
            self.directConnectGatewayId = directConnectGatewayId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayId = "directConnectGatewayId"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct DescribeDirectConnectGatewayAttachmentsResult: AWSDecodableShape {
        /// The attachments.
        public let directConnectGatewayAttachments: [DirectConnectGatewayAttachment]?
        /// The token to retrieve the next page.
        public let nextToken: String?

        @inlinable
        public init(directConnectGatewayAttachments: [DirectConnectGatewayAttachment]? = nil, nextToken: String? = nil) {
            self.directConnectGatewayAttachments = directConnectGatewayAttachments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAttachments = "directConnectGatewayAttachments"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDirectConnectGatewaysRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The maximum number of results to return with a single call.
        /// 	To retrieve the remaining results, make another call with the returned nextToken value. If MaxResults is given a value larger than 100, only 100 results are returned.
        public let maxResults: Int?
        /// The token provided in the previous call to retrieve the next page.
        public let nextToken: String?

        @inlinable
        public init(directConnectGatewayId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.directConnectGatewayId = directConnectGatewayId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayId = "directConnectGatewayId"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeDirectConnectGatewaysResult: AWSDecodableShape {
        /// The Direct Connect gateways.
        public let directConnectGateways: [DirectConnectGateway]?
        /// The token to retrieve the next page.
        public let nextToken: String?

        @inlinable
        public init(directConnectGateways: [DirectConnectGateway]? = nil, nextToken: String? = nil) {
            self.directConnectGateways = directConnectGateways
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGateways = "directConnectGateways"
            case nextToken = "nextToken"
        }
    }

    public struct DescribeHostedConnectionsRequest: AWSEncodableShape {
        /// The ID of the interconnect or LAG.
        public let connectionId: String

        @inlinable
        public init(connectionId: String) {
            self.connectionId = connectionId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
        }
    }

    public struct DescribeInterconnectLoaRequest: AWSEncodableShape {
        /// The ID of the interconnect.
        public let interconnectId: String
        /// The standard media type for the LOA-CFA document. The only supported value is application/pdf.
        public let loaContentType: LoaContentType?
        /// The name of the service provider who establishes connectivity on your behalf. If you supply this parameter, the LOA-CFA lists the provider name alongside your company name as the requester of the cross connect.
        public let providerName: String?

        @inlinable
        public init(interconnectId: String, loaContentType: LoaContentType? = nil, providerName: String? = nil) {
            self.interconnectId = interconnectId
            self.loaContentType = loaContentType
            self.providerName = providerName
        }

        private enum CodingKeys: String, CodingKey {
            case interconnectId = "interconnectId"
            case loaContentType = "loaContentType"
            case providerName = "providerName"
        }
    }

    public struct DescribeInterconnectLoaResponse: AWSDecodableShape {
        /// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA).
        public let loa: Loa?

        @inlinable
        public init(loa: Loa? = nil) {
            self.loa = loa
        }

        private enum CodingKeys: String, CodingKey {
            case loa = "loa"
        }
    }

    public struct DescribeInterconnectsRequest: AWSEncodableShape {
        /// The ID of the interconnect.
        public let interconnectId: String?

        @inlinable
        public init(interconnectId: String? = nil) {
            self.interconnectId = interconnectId
        }

        private enum CodingKeys: String, CodingKey {
            case interconnectId = "interconnectId"
        }
    }

    public struct DescribeLagsRequest: AWSEncodableShape {
        /// The ID of the LAG.
        public let lagId: String?

        @inlinable
        public init(lagId: String? = nil) {
            self.lagId = lagId
        }

        private enum CodingKeys: String, CodingKey {
            case lagId = "lagId"
        }
    }

    public struct DescribeLoaRequest: AWSEncodableShape {
        /// The ID of a connection, LAG, or interconnect.
        public let connectionId: String
        /// The standard media type for the LOA-CFA document. The only supported value is application/pdf.
        public let loaContentType: LoaContentType?
        /// The name of the service provider who establishes connectivity on your behalf. If you specify this parameter, the  LOA-CFA lists the provider name alongside your company name as the requester of the cross connect.
        public let providerName: String?

        @inlinable
        public init(connectionId: String, loaContentType: LoaContentType? = nil, providerName: String? = nil) {
            self.connectionId = connectionId
            self.loaContentType = loaContentType
            self.providerName = providerName
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case loaContentType = "loaContentType"
            case providerName = "providerName"
        }
    }

    public struct DescribeRouterConfigurationRequest: AWSEncodableShape {
        /// Identifies the router by a combination of vendor, platform, and software version. For example, CiscoSystemsInc-2900SeriesRouters-IOS124.
        public let routerTypeIdentifier: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String

        @inlinable
        public init(routerTypeIdentifier: String? = nil, virtualInterfaceId: String) {
            self.routerTypeIdentifier = routerTypeIdentifier
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case routerTypeIdentifier = "routerTypeIdentifier"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct DescribeRouterConfigurationResponse: AWSDecodableShape {
        /// The customer router configuration.
        public let customerRouterConfig: String?
        /// The details about the router.
        public let router: RouterType?
        /// The ID assigned to the virtual interface.
        public let virtualInterfaceId: String?
        /// Provides the details about a virtual interface's router.
        public let virtualInterfaceName: String?

        @inlinable
        public init(customerRouterConfig: String? = nil, router: RouterType? = nil, virtualInterfaceId: String? = nil, virtualInterfaceName: String? = nil) {
            self.customerRouterConfig = customerRouterConfig
            self.router = router
            self.virtualInterfaceId = virtualInterfaceId
            self.virtualInterfaceName = virtualInterfaceName
        }

        private enum CodingKeys: String, CodingKey {
            case customerRouterConfig = "customerRouterConfig"
            case router = "router"
            case virtualInterfaceId = "virtualInterfaceId"
            case virtualInterfaceName = "virtualInterfaceName"
        }
    }

    public struct DescribeTagsRequest: AWSEncodableShape {
        /// The Amazon Resource Names (ARNs) of the resources.
        public let resourceArns: [String]

        @inlinable
        public init(resourceArns: [String]) {
            self.resourceArns = resourceArns
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArns = "resourceArns"
        }
    }

    public struct DescribeTagsResponse: AWSDecodableShape {
        /// Information about the tags.
        public let resourceTags: [ResourceTag]?

        @inlinable
        public init(resourceTags: [ResourceTag]? = nil) {
            self.resourceTags = resourceTags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceTags = "resourceTags"
        }
    }

    public struct DescribeVirtualInterfacesRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String?

        @inlinable
        public init(connectionId: String? = nil, virtualInterfaceId: String? = nil) {
            self.connectionId = connectionId
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct DirectConnectGateway: AWSDecodableShape {
        /// The autonomous system number (ASN) for the Amazon side of the connection.
        public let amazonSideAsn: Int64?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The name of the Direct Connect gateway.
        public let directConnectGatewayName: String?
        /// The state of the Direct Connect gateway. The following are the possible values:    pending: The initial state after calling CreateDirectConnectGateway.    available: The Direct Connect gateway is ready for use.    deleting: The initial state after calling DeleteDirectConnectGateway.    deleted: The Direct Connect gateway is deleted and cannot pass traffic.
        public let directConnectGatewayState: DirectConnectGatewayState?
        /// The ID of the Amazon Web Services account that owns the Direct Connect gateway.
        public let ownerAccount: String?
        /// The error message if the state of an object failed to advance.
        public let stateChangeError: String?
        /// Information about a tag.
        public let tags: [Tag]?

        @inlinable
        public init(amazonSideAsn: Int64? = nil, directConnectGatewayId: String? = nil, directConnectGatewayName: String? = nil, directConnectGatewayState: DirectConnectGatewayState? = nil, ownerAccount: String? = nil, stateChangeError: String? = nil, tags: [Tag]? = nil) {
            self.amazonSideAsn = amazonSideAsn
            self.directConnectGatewayId = directConnectGatewayId
            self.directConnectGatewayName = directConnectGatewayName
            self.directConnectGatewayState = directConnectGatewayState
            self.ownerAccount = ownerAccount
            self.stateChangeError = stateChangeError
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case amazonSideAsn = "amazonSideAsn"
            case directConnectGatewayId = "directConnectGatewayId"
            case directConnectGatewayName = "directConnectGatewayName"
            case directConnectGatewayState = "directConnectGatewayState"
            case ownerAccount = "ownerAccount"
            case stateChangeError = "stateChangeError"
            case tags = "tags"
        }
    }

    public struct DirectConnectGatewayAssociation: AWSDecodableShape {
        /// The Amazon VPC prefixes to advertise to the Direct Connect gateway.
        public let allowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?
        /// The ID of the Cloud WAN core network associated with the Direct Connect gateway attachment.
        public let associatedCoreNetwork: AssociatedCoreNetwork?
        /// Information about the associated gateway.
        public let associatedGateway: AssociatedGateway?
        /// The ID of the Direct Connect gateway association.
        public let associationId: String?
        /// The state of the association. The following are the possible values:    associating: The initial state after calling CreateDirectConnectGatewayAssociation.    associated: The Direct Connect gateway and virtual private gateway or transit gateway are successfully associated and ready to pass traffic.    disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation.    disassociated: The virtual private gateway or transit gateway is disassociated from the Direct Connect gateway. Traffic flow between the Direct Connect gateway and virtual private gateway or transit gateway is stopped.    updating: The CIDR blocks for the virtual private gateway or transit gateway are currently being updated. This could be new CIDR blocks added or current CIDR blocks removed.
        public let associationState: DirectConnectGatewayAssociationState?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The ID of the Amazon Web Services account that owns the associated gateway.
        public let directConnectGatewayOwnerAccount: String?
        /// The error message if the state of an object failed to advance.
        public let stateChangeError: String?
        /// The ID of the virtual private gateway. Applies only to private virtual interfaces.
        public let virtualGatewayId: String?
        /// The ID of the Amazon Web Services account that owns the virtual private gateway.
        public let virtualGatewayOwnerAccount: String?
        /// The Amazon Web Services Region where the virtual private gateway is located.
        public let virtualGatewayRegion: String?

        @inlinable
        public init(allowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil, associatedCoreNetwork: AssociatedCoreNetwork? = nil, associatedGateway: AssociatedGateway? = nil, associationId: String? = nil, associationState: DirectConnectGatewayAssociationState? = nil, directConnectGatewayId: String? = nil, directConnectGatewayOwnerAccount: String? = nil, stateChangeError: String? = nil, virtualGatewayId: String? = nil, virtualGatewayOwnerAccount: String? = nil, virtualGatewayRegion: String? = nil) {
            self.allowedPrefixesToDirectConnectGateway = allowedPrefixesToDirectConnectGateway
            self.associatedCoreNetwork = associatedCoreNetwork
            self.associatedGateway = associatedGateway
            self.associationId = associationId
            self.associationState = associationState
            self.directConnectGatewayId = directConnectGatewayId
            self.directConnectGatewayOwnerAccount = directConnectGatewayOwnerAccount
            self.stateChangeError = stateChangeError
            self.virtualGatewayId = virtualGatewayId
            self.virtualGatewayOwnerAccount = virtualGatewayOwnerAccount
            self.virtualGatewayRegion = virtualGatewayRegion
        }

        private enum CodingKeys: String, CodingKey {
            case allowedPrefixesToDirectConnectGateway = "allowedPrefixesToDirectConnectGateway"
            case associatedCoreNetwork = "associatedCoreNetwork"
            case associatedGateway = "associatedGateway"
            case associationId = "associationId"
            case associationState = "associationState"
            case directConnectGatewayId = "directConnectGatewayId"
            case directConnectGatewayOwnerAccount = "directConnectGatewayOwnerAccount"
            case stateChangeError = "stateChangeError"
            case virtualGatewayId = "virtualGatewayId"
            case virtualGatewayOwnerAccount = "virtualGatewayOwnerAccount"
            case virtualGatewayRegion = "virtualGatewayRegion"
        }
    }

    public struct DirectConnectGatewayAssociationProposal: AWSDecodableShape {
        /// Information about the associated gateway.
        public let associatedGateway: AssociatedGateway?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The ID of the Amazon Web Services account that owns the Direct Connect gateway.
        public let directConnectGatewayOwnerAccount: String?
        /// The existing Amazon VPC prefixes advertised to the Direct Connect gateway.
        public let existingAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?
        /// The ID of the association proposal.
        public let proposalId: String?
        /// The state of the proposal. The following are possible values:    accepted: The proposal has been accepted. The Direct Connect gateway association is available to use in this state.    deleted: The proposal has been deleted by the owner that made the proposal.  The Direct Connect gateway association cannot be used in this state.    requested: The proposal has been requested. The Direct Connect gateway association cannot be used in this state.
        public let proposalState: DirectConnectGatewayAssociationProposalState?
        /// The Amazon VPC prefixes to advertise to the Direct Connect gateway.
        public let requestedAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?

        @inlinable
        public init(associatedGateway: AssociatedGateway? = nil, directConnectGatewayId: String? = nil, directConnectGatewayOwnerAccount: String? = nil, existingAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil, proposalId: String? = nil, proposalState: DirectConnectGatewayAssociationProposalState? = nil, requestedAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil) {
            self.associatedGateway = associatedGateway
            self.directConnectGatewayId = directConnectGatewayId
            self.directConnectGatewayOwnerAccount = directConnectGatewayOwnerAccount
            self.existingAllowedPrefixesToDirectConnectGateway = existingAllowedPrefixesToDirectConnectGateway
            self.proposalId = proposalId
            self.proposalState = proposalState
            self.requestedAllowedPrefixesToDirectConnectGateway = requestedAllowedPrefixesToDirectConnectGateway
        }

        private enum CodingKeys: String, CodingKey {
            case associatedGateway = "associatedGateway"
            case directConnectGatewayId = "directConnectGatewayId"
            case directConnectGatewayOwnerAccount = "directConnectGatewayOwnerAccount"
            case existingAllowedPrefixesToDirectConnectGateway = "existingAllowedPrefixesToDirectConnectGateway"
            case proposalId = "proposalId"
            case proposalState = "proposalState"
            case requestedAllowedPrefixesToDirectConnectGateway = "requestedAllowedPrefixesToDirectConnectGateway"
        }
    }

    public struct DirectConnectGatewayAttachment: AWSDecodableShape {
        /// The state of the attachment. The following are the possible values:    attaching: The initial state after a virtual interface is created using the Direct Connect gateway.    attached: The Direct Connect gateway and virtual interface are attached and ready to pass traffic.    detaching: The initial state after calling DeleteVirtualInterface.    detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow between the Direct Connect gateway and virtual interface is stopped.
        public let attachmentState: DirectConnectGatewayAttachmentState?
        /// The type of attachment.
        public let attachmentType: DirectConnectGatewayAttachmentType?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// The error message if the state of an object failed to advance.
        public let stateChangeError: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String?
        /// The ID of the Amazon Web Services account that owns the virtual interface.
        public let virtualInterfaceOwnerAccount: String?
        /// The Amazon Web Services Region where the virtual interface is located.
        public let virtualInterfaceRegion: String?

        @inlinable
        public init(attachmentState: DirectConnectGatewayAttachmentState? = nil, attachmentType: DirectConnectGatewayAttachmentType? = nil, directConnectGatewayId: String? = nil, stateChangeError: String? = nil, virtualInterfaceId: String? = nil, virtualInterfaceOwnerAccount: String? = nil, virtualInterfaceRegion: String? = nil) {
            self.attachmentState = attachmentState
            self.attachmentType = attachmentType
            self.directConnectGatewayId = directConnectGatewayId
            self.stateChangeError = stateChangeError
            self.virtualInterfaceId = virtualInterfaceId
            self.virtualInterfaceOwnerAccount = virtualInterfaceOwnerAccount
            self.virtualInterfaceRegion = virtualInterfaceRegion
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentState = "attachmentState"
            case attachmentType = "attachmentType"
            case directConnectGatewayId = "directConnectGatewayId"
            case stateChangeError = "stateChangeError"
            case virtualInterfaceId = "virtualInterfaceId"
            case virtualInterfaceOwnerAccount = "virtualInterfaceOwnerAccount"
            case virtualInterfaceRegion = "virtualInterfaceRegion"
        }
    }

    public struct DisassociateConnectionFromLagRequest: AWSEncodableShape {
        /// The ID of the connection.
        public let connectionId: String
        /// The ID of the LAG.
        public let lagId: String

        @inlinable
        public init(connectionId: String, lagId: String) {
            self.connectionId = connectionId
            self.lagId = lagId
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case lagId = "lagId"
        }
    }

    public struct DisassociateMacSecKeyRequest: AWSEncodableShape {
        /// The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx). You can use DescribeConnections or DescribeLags to retrieve connection ID.
        public let connectionId: String
        /// The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key. You can use DescribeConnections to retrieve the ARN of the MAC Security (MACsec) secret key.
        public let secretARN: String

        @inlinable
        public init(connectionId: String, secretARN: String) {
            self.connectionId = connectionId
            self.secretARN = secretARN
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case secretARN = "secretARN"
        }
    }

    public struct DisassociateMacSecKeyResponse: AWSDecodableShape {
        /// The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx).
        public let connectionId: String?
        /// The MAC Security (MACsec) security keys no longer associated with the dedicated connection.
        public let macSecKeys: [MacSecKey]?

        @inlinable
        public init(connectionId: String? = nil, macSecKeys: [MacSecKey]? = nil) {
            self.connectionId = connectionId
            self.macSecKeys = macSecKeys
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case macSecKeys = "macSecKeys"
        }
    }

    public struct Interconnect: AWSDecodableShape {
        /// The Direct Connect endpoint on which the physical connection terminates.
        public let awsDevice: String?
        /// The Direct Connect endpoint that terminates the physical connection.
        public let awsDeviceV2: String?
        /// The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.
        public let awsLogicalDeviceId: String?
        /// The bandwidth of the connection.
        public let bandwidth: String?
        /// Indicates whether the interconnect supports a secondary BGP in the same address family (IPv4/IPv6).
        public let hasLogicalRedundancy: HasLogicalRedundancy?
        /// The ID of the interconnect.
        public let interconnectId: String?
        /// The name of the interconnect.
        public let interconnectName: String?
        /// The state of the interconnect. The following are the possible values:    requested: The initial state of an interconnect. The interconnect stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.    pending: The interconnect is approved, and is being initialized.    available: The network link is up, and the interconnect is ready for use.    down: The network link is down.    deleting: The interconnect is being deleted.    deleted: The interconnect is deleted.    unknown: The state of the interconnect is not available.
        public let interconnectState: InterconnectState?
        /// Indicates whether jumbo frames are supported.
        public let jumboFrameCapable: Bool?
        /// The ID of the LAG.
        public let lagId: String?
        /// The time of the most recent call to DescribeLoa for this connection.
        public let loaIssueTime: Date?
        /// The location of the connection.
        public let location: String?
        /// The name of the service provider associated with the interconnect.
        public let providerName: String?
        /// The Amazon Web Services Region where the connection is located.
        public let region: String?
        /// The tags associated with the interconnect.
        public let tags: [Tag]?

        @inlinable
        public init(awsDevice: String? = nil, awsDeviceV2: String? = nil, awsLogicalDeviceId: String? = nil, bandwidth: String? = nil, hasLogicalRedundancy: HasLogicalRedundancy? = nil, interconnectId: String? = nil, interconnectName: String? = nil, interconnectState: InterconnectState? = nil, jumboFrameCapable: Bool? = nil, lagId: String? = nil, loaIssueTime: Date? = nil, location: String? = nil, providerName: String? = nil, region: String? = nil, tags: [Tag]? = nil) {
            self.awsDevice = awsDevice
            self.awsDeviceV2 = awsDeviceV2
            self.awsLogicalDeviceId = awsLogicalDeviceId
            self.bandwidth = bandwidth
            self.hasLogicalRedundancy = hasLogicalRedundancy
            self.interconnectId = interconnectId
            self.interconnectName = interconnectName
            self.interconnectState = interconnectState
            self.jumboFrameCapable = jumboFrameCapable
            self.lagId = lagId
            self.loaIssueTime = loaIssueTime
            self.location = location
            self.providerName = providerName
            self.region = region
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case awsDevice = "awsDevice"
            case awsDeviceV2 = "awsDeviceV2"
            case awsLogicalDeviceId = "awsLogicalDeviceId"
            case bandwidth = "bandwidth"
            case hasLogicalRedundancy = "hasLogicalRedundancy"
            case interconnectId = "interconnectId"
            case interconnectName = "interconnectName"
            case interconnectState = "interconnectState"
            case jumboFrameCapable = "jumboFrameCapable"
            case lagId = "lagId"
            case loaIssueTime = "loaIssueTime"
            case location = "location"
            case providerName = "providerName"
            case region = "region"
            case tags = "tags"
        }
    }

    public struct Interconnects: AWSDecodableShape {
        /// The interconnects.
        public let interconnects: [Interconnect]?

        @inlinable
        public init(interconnects: [Interconnect]? = nil) {
            self.interconnects = interconnects
        }

        private enum CodingKeys: String, CodingKey {
            case interconnects = "interconnects"
        }
    }

    public struct Lag: AWSDecodableShape {
        /// Indicates whether the LAG can host other connections.
        public let allowsHostedConnections: Bool?
        /// The Direct Connect endpoint that hosts the LAG.
        public let awsDevice: String?
        /// The Direct Connect endpoint that hosts the LAG.
        public let awsDeviceV2: String?
        /// The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.
        public let awsLogicalDeviceId: String?
        /// The connections bundled by the LAG.
        public let connections: [Connection]?
        /// The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps, 10Gbps, 100Gbps, or 400 Gbps..
        public let connectionsBandwidth: String?
        /// The LAG MAC Security (MACsec) encryption mode. The valid values are no_encrypt, should_encrypt, and must_encrypt.
        public let encryptionMode: String?
        /// Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).
        public let hasLogicalRedundancy: HasLogicalRedundancy?
        /// Indicates whether jumbo frames are supported.
        public let jumboFrameCapable: Bool?
        /// The ID of the LAG.
        public let lagId: String?
        /// The name of the LAG.
        public let lagName: String?
        /// The state of the LAG. The following are the possible values:    requested: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.    pending: The LAG has been approved and is being initialized.    available: The network link is established and the LAG is ready for use.    down: The network link is down.    deleting: The LAG is being deleted.    deleted: The LAG is deleted.    unknown: The state of the LAG is not available.
        public let lagState: LagState?
        /// The location of the LAG.
        public let location: String?
        /// Indicates whether the LAG supports MAC Security (MACsec).
        public let macSecCapable: Bool?
        /// The MAC Security (MACsec) security keys associated with the LAG.
        public let macSecKeys: [MacSecKey]?
        /// The minimum number of physical dedicated connections that must be operational for the LAG itself to be operational.
        public let minimumLinks: Int?
        /// The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1 Gbps or 10 Gbps, or two when the port speed is 100 Gbps or 400 Gbps.
        public let numberOfConnections: Int?
        /// The ID of the Amazon Web Services account that owns the LAG.
        public let ownerAccount: String?
        /// The name of the service provider associated with the LAG.
        public let providerName: String?
        /// The Amazon Web Services Region where the connection is located.
        public let region: String?
        /// The tags associated with the LAG.
        public let tags: [Tag]?

        @inlinable
        public init(allowsHostedConnections: Bool? = nil, awsDevice: String? = nil, awsDeviceV2: String? = nil, awsLogicalDeviceId: String? = nil, connections: [Connection]? = nil, connectionsBandwidth: String? = nil, encryptionMode: String? = nil, hasLogicalRedundancy: HasLogicalRedundancy? = nil, jumboFrameCapable: Bool? = nil, lagId: String? = nil, lagName: String? = nil, lagState: LagState? = nil, location: String? = nil, macSecCapable: Bool? = nil, macSecKeys: [MacSecKey]? = nil, minimumLinks: Int? = nil, numberOfConnections: Int? = nil, ownerAccount: String? = nil, providerName: String? = nil, region: String? = nil, tags: [Tag]? = nil) {
            self.allowsHostedConnections = allowsHostedConnections
            self.awsDevice = awsDevice
            self.awsDeviceV2 = awsDeviceV2
            self.awsLogicalDeviceId = awsLogicalDeviceId
            self.connections = connections
            self.connectionsBandwidth = connectionsBandwidth
            self.encryptionMode = encryptionMode
            self.hasLogicalRedundancy = hasLogicalRedundancy
            self.jumboFrameCapable = jumboFrameCapable
            self.lagId = lagId
            self.lagName = lagName
            self.lagState = lagState
            self.location = location
            self.macSecCapable = macSecCapable
            self.macSecKeys = macSecKeys
            self.minimumLinks = minimumLinks
            self.numberOfConnections = numberOfConnections
            self.ownerAccount = ownerAccount
            self.providerName = providerName
            self.region = region
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case allowsHostedConnections = "allowsHostedConnections"
            case awsDevice = "awsDevice"
            case awsDeviceV2 = "awsDeviceV2"
            case awsLogicalDeviceId = "awsLogicalDeviceId"
            case connections = "connections"
            case connectionsBandwidth = "connectionsBandwidth"
            case encryptionMode = "encryptionMode"
            case hasLogicalRedundancy = "hasLogicalRedundancy"
            case jumboFrameCapable = "jumboFrameCapable"
            case lagId = "lagId"
            case lagName = "lagName"
            case lagState = "lagState"
            case location = "location"
            case macSecCapable = "macSecCapable"
            case macSecKeys = "macSecKeys"
            case minimumLinks = "minimumLinks"
            case numberOfConnections = "numberOfConnections"
            case ownerAccount = "ownerAccount"
            case providerName = "providerName"
            case region = "region"
            case tags = "tags"
        }
    }

    public struct Lags: AWSDecodableShape {
        /// The LAGs.
        public let lags: [Lag]?

        @inlinable
        public init(lags: [Lag]? = nil) {
            self.lags = lags
        }

        private enum CodingKeys: String, CodingKey {
            case lags = "lags"
        }
    }

    public struct ListVirtualInterfaceTestHistoryRequest: AWSEncodableShape {
        /// The BGP peers that were placed in the DOWN state during the virtual interface failover test.
        public let bgpPeers: [String]?
        /// The maximum number of results to return with a single call.
        /// 	To retrieve the remaining results, make another call with the returned nextToken value. If MaxResults is given a value larger than 100, only 100 results are returned.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The status of the virtual interface failover test.
        public let status: String?
        /// The ID of the virtual interface failover test.
        public let testId: String?
        /// The ID of the virtual interface that was tested.
        public let virtualInterfaceId: String?

        @inlinable
        public init(bgpPeers: [String]? = nil, maxResults: Int? = nil, nextToken: String? = nil, status: String? = nil, testId: String? = nil, virtualInterfaceId: String? = nil) {
            self.bgpPeers = bgpPeers
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
            self.testId = testId
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case bgpPeers = "bgpPeers"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case status = "status"
            case testId = "testId"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct ListVirtualInterfaceTestHistoryResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The ID of the tested virtual interface.
        public let virtualInterfaceTestHistory: [VirtualInterfaceTestHistory]?

        @inlinable
        public init(nextToken: String? = nil, virtualInterfaceTestHistory: [VirtualInterfaceTestHistory]? = nil) {
            self.nextToken = nextToken
            self.virtualInterfaceTestHistory = virtualInterfaceTestHistory
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case virtualInterfaceTestHistory = "virtualInterfaceTestHistory"
        }
    }

    public struct Loa: AWSDecodableShape {
        /// The binary contents of the LOA-CFA document.
        public let loaContent: AWSBase64Data?
        /// The standard media type for the LOA-CFA document. The only supported value is application/pdf.
        public let loaContentType: LoaContentType?

        @inlinable
        public init(loaContent: AWSBase64Data? = nil, loaContentType: LoaContentType? = nil) {
            self.loaContent = loaContent
            self.loaContentType = loaContentType
        }

        private enum CodingKeys: String, CodingKey {
            case loaContent = "loaContent"
            case loaContentType = "loaContentType"
        }
    }

    public struct Location: AWSDecodableShape {
        /// The available MAC Security (MACsec) port speeds for the location.
        public let availableMacSecPortSpeeds: [String]?
        /// The available port speeds for the location.
        public let availablePortSpeeds: [String]?
        /// The name of the service provider for the location.
        public let availableProviders: [String]?
        /// The code for the location.
        public let locationCode: String?
        /// The name of the location. This includes the name of the colocation partner and the physical site of the building.
        public let locationName: String?
        /// The Amazon Web Services Region for the location.
        public let region: String?

        @inlinable
        public init(availableMacSecPortSpeeds: [String]? = nil, availablePortSpeeds: [String]? = nil, availableProviders: [String]? = nil, locationCode: String? = nil, locationName: String? = nil, region: String? = nil) {
            self.availableMacSecPortSpeeds = availableMacSecPortSpeeds
            self.availablePortSpeeds = availablePortSpeeds
            self.availableProviders = availableProviders
            self.locationCode = locationCode
            self.locationName = locationName
            self.region = region
        }

        private enum CodingKeys: String, CodingKey {
            case availableMacSecPortSpeeds = "availableMacSecPortSpeeds"
            case availablePortSpeeds = "availablePortSpeeds"
            case availableProviders = "availableProviders"
            case locationCode = "locationCode"
            case locationName = "locationName"
            case region = "region"
        }
    }

    public struct Locations: AWSDecodableShape {
        /// The locations.
        public let locations: [Location]?

        @inlinable
        public init(locations: [Location]? = nil) {
            self.locations = locations
        }

        private enum CodingKeys: String, CodingKey {
            case locations = "locations"
        }
    }

    public struct MacSecKey: AWSDecodableShape {
        /// The Connection Key Name (CKN) for the MAC Security secret key.
        public let ckn: String?
        /// The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key.
        public let secretARN: String?
        /// The date that the MAC Security (MACsec) secret key takes effect. The value is displayed in UTC format.
        public let startOn: String?
        /// The state of the MAC Security (MACsec) secret key. The possible values are:    associating: The MAC Security (MACsec) secret key is being validated and not yet associated with the connection or LAG.    associated: The MAC Security (MACsec) secret key is validated and associated with the connection or LAG.    disassociating: The MAC Security (MACsec) secret key is being disassociated from the connection or LAG    disassociated: The MAC Security (MACsec) secret key is no longer associated with the connection or LAG.
        public let state: String?

        @inlinable
        public init(ckn: String? = nil, secretARN: String? = nil, startOn: String? = nil, state: String? = nil) {
            self.ckn = ckn
            self.secretARN = secretARN
            self.startOn = startOn
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case ckn = "ckn"
            case secretARN = "secretARN"
            case startOn = "startOn"
            case state = "state"
        }
    }

    public struct NewBGPPeer: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
        public let asn: Int?
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int? = nil, authKey: String? = nil, customerAddress: String? = nil) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
        }
    }

    public struct NewPrivateVirtualInterface: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// Indicates whether to enable or disable SiteLink.
        public let enableSiteLink: Bool?
        /// The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.
        public let mtu: Int?
        /// The tags associated with the private virtual interface.
        public let tags: [Tag]?
        /// The ID of the virtual private gateway.
        public let virtualGatewayId: String?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String
        /// The ID of the VLAN.
        public let vlan: Int

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int = 0, authKey: String? = nil, customerAddress: String? = nil, directConnectGatewayId: String? = nil, enableSiteLink: Bool? = nil, mtu: Int? = nil, tags: [Tag]? = nil, virtualGatewayId: String? = nil, virtualInterfaceName: String, vlan: Int = 0) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
            self.directConnectGatewayId = directConnectGatewayId
            self.enableSiteLink = enableSiteLink
            self.mtu = mtu
            self.tags = tags
            self.virtualGatewayId = virtualGatewayId
            self.virtualInterfaceName = virtualInterfaceName
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
            case directConnectGatewayId = "directConnectGatewayId"
            case enableSiteLink = "enableSiteLink"
            case mtu = "mtu"
            case tags = "tags"
            case virtualGatewayId = "virtualGatewayId"
            case virtualInterfaceName = "virtualInterfaceName"
            case vlan = "vlan"
        }
    }

    public struct NewPrivateVirtualInterfaceAllocation: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.
        public let mtu: Int?
        /// The tags associated with the private virtual interface.
        public let tags: [Tag]?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String
        /// The ID of the VLAN.
        public let vlan: Int

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int = 0, authKey: String? = nil, customerAddress: String? = nil, mtu: Int? = nil, tags: [Tag]? = nil, virtualInterfaceName: String, vlan: Int = 0) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
            self.mtu = mtu
            self.tags = tags
            self.virtualInterfaceName = virtualInterfaceName
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
            case mtu = "mtu"
            case tags = "tags"
            case virtualInterfaceName = "virtualInterfaceName"
            case vlan = "vlan"
        }
    }

    public struct NewPublicVirtualInterface: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual interfaces.
        public let routeFilterPrefixes: [RouteFilterPrefix]?
        /// The tags associated with the public virtual interface.
        public let tags: [Tag]?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String
        /// The ID of the VLAN.
        public let vlan: Int

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int = 0, authKey: String? = nil, customerAddress: String? = nil, routeFilterPrefixes: [RouteFilterPrefix]? = nil, tags: [Tag]? = nil, virtualInterfaceName: String, vlan: Int = 0) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
            self.routeFilterPrefixes = routeFilterPrefixes
            self.tags = tags
            self.virtualInterfaceName = virtualInterfaceName
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
            case routeFilterPrefixes = "routeFilterPrefixes"
            case tags = "tags"
            case virtualInterfaceName = "virtualInterfaceName"
            case vlan = "vlan"
        }
    }

    public struct NewPublicVirtualInterfaceAllocation: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual interfaces.
        public let routeFilterPrefixes: [RouteFilterPrefix]?
        /// The tags associated with the public virtual interface.
        public let tags: [Tag]?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String
        /// The ID of the VLAN.
        public let vlan: Int

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int = 0, authKey: String? = nil, customerAddress: String? = nil, routeFilterPrefixes: [RouteFilterPrefix]? = nil, tags: [Tag]? = nil, virtualInterfaceName: String, vlan: Int = 0) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
            self.routeFilterPrefixes = routeFilterPrefixes
            self.tags = tags
            self.virtualInterfaceName = virtualInterfaceName
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
            case routeFilterPrefixes = "routeFilterPrefixes"
            case tags = "tags"
            case virtualInterfaceName = "virtualInterfaceName"
            case vlan = "vlan"
        }
    }

    public struct NewTransitVirtualInterface: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int?
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// Indicates whether to enable or disable SiteLink.
        public let enableSiteLink: Bool?
        /// The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.
        public let mtu: Int?
        /// The tags associated with the transitive virtual interface.
        public let tags: [Tag]?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String?
        /// The ID of the VLAN.
        public let vlan: Int?

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int? = nil, authKey: String? = nil, customerAddress: String? = nil, directConnectGatewayId: String? = nil, enableSiteLink: Bool? = nil, mtu: Int? = nil, tags: [Tag]? = nil, virtualInterfaceName: String? = nil, vlan: Int? = nil) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
            self.directConnectGatewayId = directConnectGatewayId
            self.enableSiteLink = enableSiteLink
            self.mtu = mtu
            self.tags = tags
            self.virtualInterfaceName = virtualInterfaceName
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
            case directConnectGatewayId = "directConnectGatewayId"
            case enableSiteLink = "enableSiteLink"
            case mtu = "mtu"
            case tags = "tags"
            case virtualInterfaceName = "virtualInterfaceName"
            case vlan = "vlan"
        }
    }

    public struct NewTransitVirtualInterfaceAllocation: AWSEncodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int?
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500
        public let mtu: Int?
        /// The tags associated with the transitive virtual interface.
        public let tags: [Tag]?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String?
        /// The ID of the VLAN.
        public let vlan: Int?

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, asn: Int? = nil, authKey: String? = nil, customerAddress: String? = nil, mtu: Int? = nil, tags: [Tag]? = nil, virtualInterfaceName: String? = nil, vlan: Int? = nil) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.asn = asn
            self.authKey = authKey
            self.customerAddress = customerAddress
            self.mtu = mtu
            self.tags = tags
            self.virtualInterfaceName = virtualInterfaceName
            self.vlan = vlan
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case asn = "asn"
            case authKey = "authKey"
            case customerAddress = "customerAddress"
            case mtu = "mtu"
            case tags = "tags"
            case virtualInterfaceName = "virtualInterfaceName"
            case vlan = "vlan"
        }
    }

    public struct ResourceTag: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String?
        /// The tags.
        public let tags: [Tag]?

        @inlinable
        public init(resourceArn: String? = nil, tags: [Tag]? = nil) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tags = "tags"
        }
    }

    public struct RouteFilterPrefix: AWSEncodableShape & AWSDecodableShape {
        /// The CIDR block for the advertised route. Separate multiple routes using commas. An IPv6 CIDR must use /64 or shorter.
        public let cidr: String?

        @inlinable
        public init(cidr: String? = nil) {
            self.cidr = cidr
        }

        private enum CodingKeys: String, CodingKey {
            case cidr = "cidr"
        }
    }

    public struct RouterType: AWSDecodableShape {
        /// The virtual interface router platform.
        public let platform: String?
        /// Identifies the router by a combination of vendor, platform, and software version. For example, CiscoSystemsInc-2900SeriesRouters-IOS124.
        public let routerTypeIdentifier: String?
        /// The router software.
        public let software: String?
        /// The vendor for the virtual interface's router.
        public let vendor: String?
        /// The template for the virtual interface's router.
        public let xsltTemplateName: String?
        /// The MAC Security (MACsec) template for the virtual interface's router.
        public let xsltTemplateNameForMacSec: String?

        @inlinable
        public init(platform: String? = nil, routerTypeIdentifier: String? = nil, software: String? = nil, vendor: String? = nil, xsltTemplateName: String? = nil, xsltTemplateNameForMacSec: String? = nil) {
            self.platform = platform
            self.routerTypeIdentifier = routerTypeIdentifier
            self.software = software
            self.vendor = vendor
            self.xsltTemplateName = xsltTemplateName
            self.xsltTemplateNameForMacSec = xsltTemplateNameForMacSec
        }

        private enum CodingKeys: String, CodingKey {
            case platform = "platform"
            case routerTypeIdentifier = "routerTypeIdentifier"
            case software = "software"
            case vendor = "vendor"
            case xsltTemplateName = "xsltTemplateName"
            case xsltTemplateNameForMacSec = "xsltTemplateNameForMacSec"
        }
    }

    public struct StartBgpFailoverTestRequest: AWSEncodableShape {
        /// The BGP peers to place in the DOWN state.
        public let bgpPeers: [String]?
        /// The time in minutes that the virtual interface failover test will last. Maximum value: 4,320 minutes (72 hours). Default: 180 minutes (3 hours).
        public let testDurationInMinutes: Int?
        /// The ID of the virtual interface you want to test.
        public let virtualInterfaceId: String

        @inlinable
        public init(bgpPeers: [String]? = nil, testDurationInMinutes: Int? = nil, virtualInterfaceId: String) {
            self.bgpPeers = bgpPeers
            self.testDurationInMinutes = testDurationInMinutes
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case bgpPeers = "bgpPeers"
            case testDurationInMinutes = "testDurationInMinutes"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct StartBgpFailoverTestResponse: AWSDecodableShape {
        /// Information about the virtual interface failover test.
        public let virtualInterfaceTest: VirtualInterfaceTestHistory?

        @inlinable
        public init(virtualInterfaceTest: VirtualInterfaceTestHistory? = nil) {
            self.virtualInterfaceTest = virtualInterfaceTest
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceTest = "virtualInterfaceTest"
        }
    }

    public struct StopBgpFailoverTestRequest: AWSEncodableShape {
        /// The ID of the virtual interface you no longer want to test.
        public let virtualInterfaceId: String

        @inlinable
        public init(virtualInterfaceId: String) {
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct StopBgpFailoverTestResponse: AWSDecodableShape {
        /// Information about the virtual interface failover test.
        public let virtualInterfaceTest: VirtualInterfaceTestHistory?

        @inlinable
        public init(virtualInterfaceTest: VirtualInterfaceTestHistory? = nil) {
            self.virtualInterfaceTest = virtualInterfaceTest
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaceTest = "virtualInterfaceTest"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key.
        public let key: String
        /// The value.
        public let value: String?

        @inlinable
        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case value = "value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tags to add.
        public let tags: [Tag]

        @inlinable
        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tag keys of the tags to remove.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tagKeys = "tagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateConnectionRequest: AWSEncodableShape {
        /// The ID of the dedicated connection. You can use DescribeConnections to retrieve the connection ID.
        public let connectionId: String
        /// The name of the connection.
        public let connectionName: String?
        /// The connection MAC Security (MACsec) encryption mode. The valid values are no_encrypt, should_encrypt, and must_encrypt.
        public let encryptionMode: String?

        @inlinable
        public init(connectionId: String, connectionName: String? = nil, encryptionMode: String? = nil) {
            self.connectionId = connectionId
            self.connectionName = connectionName
            self.encryptionMode = encryptionMode
        }

        private enum CodingKeys: String, CodingKey {
            case connectionId = "connectionId"
            case connectionName = "connectionName"
            case encryptionMode = "encryptionMode"
        }
    }

    public struct UpdateDirectConnectGatewayAssociationRequest: AWSEncodableShape {
        /// The Amazon VPC prefixes to advertise to the Direct Connect gateway.
        public let addAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?
        /// The ID of the Direct Connect gateway association.
        public let associationId: String?
        /// The Amazon VPC prefixes to no longer advertise to the Direct Connect gateway.
        public let removeAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]?

        @inlinable
        public init(addAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil, associationId: String? = nil, removeAllowedPrefixesToDirectConnectGateway: [RouteFilterPrefix]? = nil) {
            self.addAllowedPrefixesToDirectConnectGateway = addAllowedPrefixesToDirectConnectGateway
            self.associationId = associationId
            self.removeAllowedPrefixesToDirectConnectGateway = removeAllowedPrefixesToDirectConnectGateway
        }

        private enum CodingKeys: String, CodingKey {
            case addAllowedPrefixesToDirectConnectGateway = "addAllowedPrefixesToDirectConnectGateway"
            case associationId = "associationId"
            case removeAllowedPrefixesToDirectConnectGateway = "removeAllowedPrefixesToDirectConnectGateway"
        }
    }

    public struct UpdateDirectConnectGatewayAssociationResult: AWSDecodableShape {
        /// Information about an association between a Direct Connect gateway and a virtual private gateway or transit gateway.
        public let directConnectGatewayAssociation: DirectConnectGatewayAssociation?

        @inlinable
        public init(directConnectGatewayAssociation: DirectConnectGatewayAssociation? = nil) {
            self.directConnectGatewayAssociation = directConnectGatewayAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayAssociation = "directConnectGatewayAssociation"
        }
    }

    public struct UpdateDirectConnectGatewayRequest: AWSEncodableShape {
        /// The ID of the Direct Connect gateway to update.
        public let directConnectGatewayId: String
        /// The new name for the Direct Connect gateway.
        public let newDirectConnectGatewayName: String

        @inlinable
        public init(directConnectGatewayId: String, newDirectConnectGatewayName: String) {
            self.directConnectGatewayId = directConnectGatewayId
            self.newDirectConnectGatewayName = newDirectConnectGatewayName
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGatewayId = "directConnectGatewayId"
            case newDirectConnectGatewayName = "newDirectConnectGatewayName"
        }
    }

    public struct UpdateDirectConnectGatewayResponse: AWSDecodableShape {
        /// Informaiton about a Direct Connect gateway, which enables you to connect virtual interfaces and virtual private gateways or transit gateways.
        public let directConnectGateway: DirectConnectGateway?

        @inlinable
        public init(directConnectGateway: DirectConnectGateway? = nil) {
            self.directConnectGateway = directConnectGateway
        }

        private enum CodingKeys: String, CodingKey {
            case directConnectGateway = "directConnectGateway"
        }
    }

    public struct UpdateLagRequest: AWSEncodableShape {
        /// The LAG MAC Security (MACsec) encryption mode. Amazon Web Services applies the value to all connections which are part of the LAG.
        public let encryptionMode: String?
        /// The ID of the LAG.
        public let lagId: String
        /// The name of the LAG.
        public let lagName: String?
        /// The minimum number of physical connections that must be operational for the LAG itself to be operational.
        public let minimumLinks: Int?

        @inlinable
        public init(encryptionMode: String? = nil, lagId: String, lagName: String? = nil, minimumLinks: Int? = nil) {
            self.encryptionMode = encryptionMode
            self.lagId = lagId
            self.lagName = lagName
            self.minimumLinks = minimumLinks
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionMode = "encryptionMode"
            case lagId = "lagId"
            case lagName = "lagName"
            case minimumLinks = "minimumLinks"
        }
    }

    public struct UpdateVirtualInterfaceAttributesRequest: AWSEncodableShape {
        /// Indicates whether to enable or disable SiteLink.
        public let enableSiteLink: Bool?
        /// The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.
        public let mtu: Int?
        /// The ID of the virtual private interface.
        public let virtualInterfaceId: String
        /// The name of the virtual private interface.
        public let virtualInterfaceName: String?

        @inlinable
        public init(enableSiteLink: Bool? = nil, mtu: Int? = nil, virtualInterfaceId: String, virtualInterfaceName: String? = nil) {
            self.enableSiteLink = enableSiteLink
            self.mtu = mtu
            self.virtualInterfaceId = virtualInterfaceId
            self.virtualInterfaceName = virtualInterfaceName
        }

        private enum CodingKeys: String, CodingKey {
            case enableSiteLink = "enableSiteLink"
            case mtu = "mtu"
            case virtualInterfaceId = "virtualInterfaceId"
            case virtualInterfaceName = "virtualInterfaceName"
        }
    }

    public struct VirtualGateway: AWSDecodableShape {
        /// The ID of the virtual private gateway.
        public let virtualGatewayId: String?
        /// The state of the virtual private gateway. The following are the possible values:    pending: Initial state after creating the virtual private gateway.    available: Ready for use by a private virtual interface.    deleting: Initial state after deleting the virtual private gateway.    deleted: The virtual private gateway is deleted. The private virtual interface is unable to send traffic over this gateway.
        public let virtualGatewayState: String?

        @inlinable
        public init(virtualGatewayId: String? = nil, virtualGatewayState: String? = nil) {
            self.virtualGatewayId = virtualGatewayId
            self.virtualGatewayState = virtualGatewayState
        }

        private enum CodingKeys: String, CodingKey {
            case virtualGatewayId = "virtualGatewayId"
            case virtualGatewayState = "virtualGatewayState"
        }
    }

    public struct VirtualGateways: AWSDecodableShape {
        /// The virtual private gateways.
        public let virtualGateways: [VirtualGateway]?

        @inlinable
        public init(virtualGateways: [VirtualGateway]? = nil) {
            self.virtualGateways = virtualGateways
        }

        private enum CodingKeys: String, CodingKey {
            case virtualGateways = "virtualGateways"
        }
    }

    public struct VirtualInterface: AWSDecodableShape {
        /// The address family for the BGP peer.
        public let addressFamily: AddressFamily?
        /// The IP address assigned to the Amazon interface.
        public let amazonAddress: String?
        /// The autonomous system number (ASN) for the Amazon side of the connection.
        public let amazonSideAsn: Int64?
        /// The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. The valid values are 1-2147483647.
        public let asn: Int?
        /// The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
        public let authKey: String?
        /// The Direct Connect endpoint that terminates the physical connection.
        public let awsDeviceV2: String?
        /// The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.
        public let awsLogicalDeviceId: String?
        /// The BGP peers configured on this virtual interface.
        public let bgpPeers: [BGPPeer]?
        /// The ID of the connection.
        public let connectionId: String?
        /// The IP address assigned to the customer interface.
        public let customerAddress: String?
        /// The customer router configuration.
        public let customerRouterConfig: String?
        /// The ID of the Direct Connect gateway.
        public let directConnectGatewayId: String?
        /// Indicates whether jumbo frames are supported.
        public let jumboFrameCapable: Bool?
        /// The location of the connection.
        public let location: String?
        /// The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500
        public let mtu: Int?
        /// The ID of the Amazon Web Services account that owns the virtual interface.
        public let ownerAccount: String?
        /// The Amazon Web Services Region where the virtual interface is located.
        public let region: String?
        /// The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual interfaces.
        public let routeFilterPrefixes: [RouteFilterPrefix]?
        /// Indicates whether SiteLink is enabled.
        public let siteLinkEnabled: Bool?
        /// The tags associated with the virtual interface.
        public let tags: [Tag]?
        /// The ID of the virtual private gateway. Applies only to private virtual interfaces.
        public let virtualGatewayId: String?
        /// The ID of the virtual interface.
        public let virtualInterfaceId: String?
        /// The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
        public let virtualInterfaceName: String?
        /// The state of the virtual interface. The following are the possible values:    confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.    verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.    pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.    available: A virtual interface that is able to forward traffic.    down: A virtual interface that is BGP down.    testing: A virtual interface is in this state immediately after calling StartBgpFailoverTest and remains in this state during the duration of the test.    deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.    deleted: A virtual interface that cannot forward traffic.    rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.    unknown: The state of the virtual interface is not available.
        public let virtualInterfaceState: VirtualInterfaceState?
        /// The type of virtual interface. The possible values are private, public and transit.
        public let virtualInterfaceType: String?
        /// The ID of the VLAN.
        public let vlan: Int?

        @inlinable
        public init(addressFamily: AddressFamily? = nil, amazonAddress: String? = nil, amazonSideAsn: Int64? = nil, asn: Int? = nil, authKey: String? = nil, awsDeviceV2: String? = nil, awsLogicalDeviceId: String? = nil, bgpPeers: [BGPPeer]? = nil, connectionId: String? = nil, customerAddress: String? = nil, customerRouterConfig: String? = nil, directConnectGatewayId: String? = nil, jumboFrameCapable: Bool? = nil, location: String? = nil, mtu: Int? = nil, ownerAccount: String? = nil, region: String? = nil, routeFilterPrefixes: [RouteFilterPrefix]? = nil, siteLinkEnabled: Bool? = nil, tags: [Tag]? = nil, virtualGatewayId: String? = nil, virtualInterfaceId: String? = nil, virtualInterfaceName: String? = nil, virtualInterfaceState: VirtualInterfaceState? = nil, virtualInterfaceType: String? = nil, vlan: Int? = nil) {
            self.addressFamily = addressFamily
            self.amazonAddress = amazonAddress
            self.amazonSideAsn = amazonSideAsn
            self.asn = asn
            self.authKey = authKey
            self.awsDeviceV2 = awsDeviceV2
            self.awsLogicalDeviceId = awsLogicalDeviceId
            self.bgpPeers = bgpPeers
            self.connectionId = connectionId
            self.customerAddress = customerAddress
            self.customerRouterConfig = customerRouterConfig
            self.directConnectGatewayId = directConnectGatewayId
            self.jumboFrameCapable = jumboFrameCapable
            self.location = location
            self.mtu = mtu
            self.ownerAccount = ownerAccount
            self.region = region
            self.routeFilterPrefixes = routeFilterPrefixes
            self.siteLinkEnabled = siteLinkEnabled
            self.tags = tags
            self.virtualGatewayId = virtualGatewayId
            self.virtualInterfaceId = virtualInterfaceId
            self.virtualInterfaceName = virtualInterfaceName
            self.virtualInterfaceState = virtualInterfaceState
            self.virtualInterfaceType = virtualInterfaceType
            self.vlan = vlan
        }

        private enum CodingKeys: String, CodingKey {
            case addressFamily = "addressFamily"
            case amazonAddress = "amazonAddress"
            case amazonSideAsn = "amazonSideAsn"
            case asn = "asn"
            case authKey = "authKey"
            case awsDeviceV2 = "awsDeviceV2"
            case awsLogicalDeviceId = "awsLogicalDeviceId"
            case bgpPeers = "bgpPeers"
            case connectionId = "connectionId"
            case customerAddress = "customerAddress"
            case customerRouterConfig = "customerRouterConfig"
            case directConnectGatewayId = "directConnectGatewayId"
            case jumboFrameCapable = "jumboFrameCapable"
            case location = "location"
            case mtu = "mtu"
            case ownerAccount = "ownerAccount"
            case region = "region"
            case routeFilterPrefixes = "routeFilterPrefixes"
            case siteLinkEnabled = "siteLinkEnabled"
            case tags = "tags"
            case virtualGatewayId = "virtualGatewayId"
            case virtualInterfaceId = "virtualInterfaceId"
            case virtualInterfaceName = "virtualInterfaceName"
            case virtualInterfaceState = "virtualInterfaceState"
            case virtualInterfaceType = "virtualInterfaceType"
            case vlan = "vlan"
        }
    }

    public struct VirtualInterfaceTestHistory: AWSDecodableShape {
        /// The BGP peers that were put in the DOWN state as part of the virtual interface failover test.
        public let bgpPeers: [String]?
        /// The time that the virtual interface moves out of the DOWN state.
        public let endTime: Date?
        /// The owner ID of the tested virtual interface.
        public let ownerAccount: String?
        /// The time that the virtual interface moves to the DOWN state.
        public let startTime: Date?
        /// The status of the virtual interface failover test.
        public let status: String?
        /// The time that the virtual interface failover test ran in minutes.
        public let testDurationInMinutes: Int?
        /// The ID of the virtual interface failover test.
        public let testId: String?
        /// The ID of the tested virtual interface.
        public let virtualInterfaceId: String?

        @inlinable
        public init(bgpPeers: [String]? = nil, endTime: Date? = nil, ownerAccount: String? = nil, startTime: Date? = nil, status: String? = nil, testDurationInMinutes: Int? = nil, testId: String? = nil, virtualInterfaceId: String? = nil) {
            self.bgpPeers = bgpPeers
            self.endTime = endTime
            self.ownerAccount = ownerAccount
            self.startTime = startTime
            self.status = status
            self.testDurationInMinutes = testDurationInMinutes
            self.testId = testId
            self.virtualInterfaceId = virtualInterfaceId
        }

        private enum CodingKeys: String, CodingKey {
            case bgpPeers = "bgpPeers"
            case endTime = "endTime"
            case ownerAccount = "ownerAccount"
            case startTime = "startTime"
            case status = "status"
            case testDurationInMinutes = "testDurationInMinutes"
            case testId = "testId"
            case virtualInterfaceId = "virtualInterfaceId"
        }
    }

    public struct VirtualInterfaces: AWSDecodableShape {
        /// The virtual interfaces
        public let virtualInterfaces: [VirtualInterface]?

        @inlinable
        public init(virtualInterfaces: [VirtualInterface]? = nil) {
            self.virtualInterfaces = virtualInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case virtualInterfaces = "virtualInterfaces"
        }
    }
}

// MARK: - Errors

/// Error enum for DirectConnect
public struct DirectConnectErrorType: AWSErrorType {
    enum Code: String {
        case directConnectClientException = "DirectConnectClientException"
        case directConnectServerException = "DirectConnectServerException"
        case duplicateTagKeysException = "DuplicateTagKeysException"
        case tooManyTagsException = "TooManyTagsException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize DirectConnect
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// One or more parameters are not valid.
    public static var directConnectClientException: Self { .init(.directConnectClientException) }
    /// A server-side error occurred.
    public static var directConnectServerException: Self { .init(.directConnectServerException) }
    /// A tag key was specified more than once.
    public static var duplicateTagKeysException: Self { .init(.duplicateTagKeysException) }
    /// You have reached the limit on the number of tags that can be assigned.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
}

extension DirectConnectErrorType: Equatable {
    public static func == (lhs: DirectConnectErrorType, rhs: DirectConnectErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension DirectConnectErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
